This reverts commit db7c47f97d.
Too many joined channels at once started to cause disconnect because of
"Max SendQ Exceeded", which is not much better than previous Flood.
Now MaxJoins is 0 by default, which preserves the current behavior of
joining all channels at once. If someone experiences those disconnects
due to SendQ, they can tune MaxJoins.
Fix#329
Conflicts:
include/znc/User.h
modules/controlpanel.cpp
modules/webadmin.cpp
src/User.cpp
This reverts commit 11e5f7636d.
Having this in the raw buffer multiple times is obviously wrong, because you can
use /oper more than once and would get a new 381 numeric each time. So this
would need to use UpdateRawBuffer() instead of AddRawBuffer() (=replace old
entries with the same text).
However, this is still wrong. If you -o yourself, you no longer have oper
status. ZNC wouldn't notice this and still deliver the 381 numeric to new
clients.
Clients which use raw 381 to detect oper status will have to switch to user mode
+o.
Thanks to Han` for reporting this problem.
Previously, every line that was forwarded to the IRCd was printed twice in debug
mode. Once when it got added to the send queue and a second time when it was
actually sent. However, most of the time this queue is empty and thus the two
events happened at approximately the same time.
Thus, this patch now changes the debug output. Lines are only printed extra if
they really have to wait in the queue for a while before they can be sent out.
This has the positive effect of making the debug output more readable, because
it is shorter and less repetitive and it makes it more obvious when znc actively
throttles the traffic that is sent out.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of doing magic with the result from version.sh so that we can add a
preprocessor macro, the script now just writes src/version.cpp with the expected
content. This should fix all the various issues that we have with quoting the
arguments and things that go wrong when not building znc from a git clone.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This just moves the pipe from the socket code to the thread pool. However, now
all CJobs can use this and there is a single place for them to get deleted.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This should make it easier to work with threads. It provides classes for mutexes
and condition variables. Additionally, there is a special CMutexGuard that
automatically unlocks the mutex on destruction and a CThreadPool class.
This thread pool is used to replace the thread pool in the sockets code.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If nicks are equal, it's not changed. The problem was that equality was
checked case-insensitively.
This makes some clients which compare nicks case-sensitively think that
JOINs which we send to them, are not related to the user, it's someone
else joining. So Konversation users which have lower case version of
their IRC nick configured in Konversation settings, didn't get their
channel opened when connecting to ZNC.
Thanks to Axanon for helping to investigate the issue.
When it was renamed, it already was a network module, and IRCNetwork got
a check for away module.
But users of 0.206 and earlier have this module loaded as user module,
they even can't have networks at all, so the renaming didn't go smooth
for them :(
It's broken in 1.0 already anyway, but users who skip 1.0 and upgrade
from older version to 1.2+ directly will be happier.
Thanks to Ammler (Marcel Gmür) for reporting it.
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>
The specs are going to change to support leap seconds properly,
so ZNC implementation will need to be updated.
But it would be too big change now, when 1.0-beta is out.
So support for this capability is delayed for 1.2