Commit Graph

39 Commits

Author SHA1 Message Date
J-P Nurmi
7680421053 Fix #840 - channel hopping/cycling
A regression caused by aed1d61.
2015-02-02 10:41:13 +01:00
Falk Seidel
2e29d49a53 Welcome to 2015 2014-12-31 11:28:38 +01:00
Alexey Sokolov
c8f49e1da0 Merge pull request #754 from jpnurmi/ready
Add CClient::IsPlaybackActive()
2014-12-04 21:56:13 +00:00
J-P Nurmi
efe1e1ee91 Add CClient::IsPlaybackActive()
To let modules know whether a client is currently in playback mode.
The clientbuffer module (#343) wants to update "last seen message"
timestamps in OnSendToClient() but it must avoid doing that while
in playback mode.
2014-12-01 11:47:24 +01:00
Alexey Sokolov
73d71cc388 Merge pull request #756 from jpnurmi/timestamp
Pass timestamp to playline hooks
2014-11-29 11:27:25 +00:00
J-P Nurmi
80b799cec0 Pass timestamp to playline hooks
This allows implementing timestamp-based (eg. client specific - #343)
filtering of playback buffers. For clients that don't support server-time,
getting an accurate timestamp out of a raw buffer playline is impossible.
2014-11-27 20:45:35 +01:00
J-P Nurmi
4a31ec57de Fix #759 - channels cannot be reattached
This was a regression caused by aed1d61 :(
2014-11-26 12:34:47 +01:00
J-P Nurmi
aed1d61a98 Revise CChan::JoinUser() & AttachUser()
The old AttachUser() that sent JOIN without topic or names replies
would leave clients in incomplete/broken state. JoinUser() was doing
two things; depending on passed arguments it was either joining user
on the channel on IRC, or attaching clients (properly). Now JoinUser()
joins the user on IRC, and AttachUser() attaches as expected from the
method names.
2014-11-10 22:24:34 +01:00
J-P Nurmi
c424bd7aca CChan: keep track of the state
Make CChan keep track of the channel key, and schedule saving of the
config file when appropriate. This is more robust than trying to do
it from within the chansaver module.
2014-10-20 07:11:38 +02:00
J-P Nurmi
cd94702b92 Write disabled status to chan config 2014-10-08 23:35:06 +02:00
J-P Nurmi
ef4caae6d1 const correctness fixes 2014-10-03 09:14:12 +02:00
J-P Nurmi
4fe249280e Fix GetClients() const correctness
It’s dangerous to give a non-const reference to an internal
container that the API users are not supposed to modify.
2014-10-03 09:11:03 +02:00
J-P Nurmi
6457bd6dc1 Fix #680 - make channels follow user-level settings when appropriate 2014-09-30 00:34:01 +02:00
NuclearW
73b6936d6d Add ircv3.2 batch and batch channel and query buffer playback. 2014-09-28 14:57:06 -04:00
J-P Nurmi
f238a24190 Fix CChan::SendBuffer()
The CChan::SendBuffer(CClient,CBuffer) overload should just playback
the given buffer and obviously not clear the channel's own buffer
=> auto-clear the buffer in CChan::SendBuffer(CClient) as appropriate.
2014-08-08 23:36:21 +02:00
Alexey Sokolov
9cf61ac6d4 Argh, fuck it. Rename fixed (pointer) versions of OnMode to OnMode2 2014-04-12 08:51:04 +01:00
J-P Nurmi
2b0c47aa8e Add CChan::SendBuffer(client, buffer) overload
This allows interested parties eg. modules to to send a partial
buffer playback without reinventing the wheel.
2014-03-04 08:27:10 +01:00
Alexey Sokolov
618d9c58a4 Fix chansaver's channel keys by adding other OnMode() hooks 2014-02-27 00:49:45 +00:00
Falk Seidel
f19b4caa43 Welcome to 2014 - year 10 with ZNC 2013-12-31 10:10:55 +01:00
Toon Schoenmakers
98ceafb1ba Replaced the GetNick().Equals() with NickEquals() where possible
Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
2013-10-10 22:35:49 +02:00
Alexey Sokolov
b2dcad5fd4 Change ZNC license to Apache 2.0
The following people agreed with the change, in alphabetical order:
(people who approved in several ways are listed only once)
By email:
- Adam (from Anope)
- Austin Morton
- Brian Campbell
- Christian Walde
- Daniel Holbert
- Daniel Wallace
- Falk Seidel
- Heiko Hund
- Ingmar Runge
- Jim Hull
- Kyle Fuller
- Lee Aylward
- Martin Martimeo
- Matt Harper
- Michael J Edgar
- Michael Ziegler
- Nick Bebout
- Paul Driver
- Perry Nguyen
- Philippe (cycomate)
- Reuben Morais
- Roland Hieber
- Sebastian Ramacher
- Stefan Rado
- Stéphan Kochen
- Thomas Ward
- Toon Schoenmakers
- Veit Wahlich
- Wulf C. Krueger

By IRC:
- CNU
- Jonas Gorski
- Joshua M. Clulow
- Prozac/SHiZNO
- SilverLeo
- Uli Schlachter

At https://github.com/znc/znc/issues/311 :
- Alexey Sokolov
- Elizabeth Myers
- flakes
- Jens-Andre Koch
- Jyzee
- KindOne/ineedalifetoday
- Lee Williams
- Mantas Mikulėnas
- md-5
- Reed Loden

At the last few pull requests' comments:
- Allan Odgaard
- Jacob Baines
- Lluís Batlle i Rossell
- ravomavain
- protomouse

The following commits' authors didn't respond:
Trivial changes:
- f70f1086fd
- 4ca8b50e45

The changes which are not presented in master anymore:
- 5512ed2ea0
- 960a4498f7
- 0f739de2c0
- 7f53cc810b

Fix #311
Fix #218
2013-06-14 00:43:34 +04:00
KindOne
2db7307ac3 Remove unneeded headers. 2013-03-08 01:47:57 +07:00
Un1matr1x
3a34593359 The same procedure as last year, Miss sophie?
Same procedure as every year, James.
2012-12-31 12:44:31 +01:00
Uli Schlachter
8ffab186b4 CModule::OnMode(): Fix a stupid NULL pointer dereference
When joining a channel, OnMode() (via SetModes()) was called with pOpNick ==
NULL. This bad pointer was turned into a reference and given to modules.

This bug exists since 2008 when the OnMode() module call was added. It wasn't
noticed before because apparently no module used this CNick argument before.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-06 17:28:05 +01:00
Kyle Fuller
67299ebfa8 Fix a bunch of conversion warnings #197 2012-08-14 19:31:14 +07:00
Alexey Sokolov
27aa7036f5 Fix #117 2012-08-10 19:32:27 +07:00
Alexey Sokolov
62c9ac1a0b using in headers is evil :( 2012-07-26 20:46:11 +07:00
Kyle Fuller
bb73c600e4 bNoChange in On{,De}{Op,Voice} wast incorrect
Fixes #128
2012-06-28 21:03:04 +01:00
Kyle Fuller
8f6b5977aa Don't show Buffer playback/complete messages with server-time 2012-06-24 21:25:41 +01:00
Alexey Sokolov
27f42d1118 Rename (non-) KeepBuffer to AutoClearChanBuffer.
It should be a less confusing name...
2012-05-09 22:32:12 +07:00
Kyle Fuller
6999c8222d ResetJoinTries once we enable a channel
Fixes #83
2012-03-21 22:25:45 +00:00
Kyle Fuller
f44b7fc7c4 Clear channel buffers if keep buffer is disabled and we're online 2012-03-06 17:55:14 +00:00
Un1matr1x
73270ff023 Welcome in 2012 2012-01-01 09:30:19 +01:00
Kyle Fuller
74738a20b7 Fix a NULL pointer issue on CChan::SaveBuff
I also cleaned up a little and loop over vClients once instead of twice
2011-11-07 16:55:55 +00:00
Stéphan Kochen
c36480c8a1 Store and format time in CBufLine.
Buflines need to know which part of text to wrap with the timestamp. The
second parameter to `AddLine` (and shorthands) is that text, which after
wrapping is added as the `text` parameter to `NamedFormat`.

Timestamps are formatted at the moment buffers are flushed to the
client. The client parameter to `GetLine` provides access to the User
and the new server-time capability.
2011-10-27 18:25:25 +02:00
Stéphan Kochen
c3d677a4d8 Slight refactor of CBuffer & CBufLine.
This is in preparation of adding more attributes to a CBufLine. Going
forward, at least savebuf will need access to all of these to properly
serialize buffers.

Basically, instead of relying on `GetLine()` to return `false`, the
caller is now expected to check bounds himself using `Size()`.
2011-10-27 18:25:25 +02:00
Stéphan Kochen
cb4131e320 Unify channel buffers and CBuffer. 2011-10-27 18:25:25 +02:00
Alexey Sokolov
2c1ca45353 Merge branch 'headers' 2011-09-28 20:15:20 +07:00
Alexey Sokolov
afeab4a9e6 Move core .cpp files to src/ 2011-09-23 03:33:13 +07:00