"Don't force --foreground when compiled with --enable-debug"
Instead, this is now wrapped in an #ifdef ALWAYS_RUN_IN_FOREGROUND, so that I
can use ./configure CXXFLAGS="-DALWAYS_RUN_IN_FOREGROUND".
Signed-off-by: Uli Schlachter <psychon@znc.in>
This changes admin to assume that an "empty username" was specified if some
arguments is empty which shouldn't be empty. This empty username is then
interpreted as meaning the current user.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This function is the counterpart for CUser::AddCTCPReply(). Guess what? It
removes an entry from CUser::m_mssCTCPReplies again! It's magic!
Signed-off-by: Uli Schlachter <psychon@znc.in>
It shouldn't make any real difference (especially not for std::vector), but
"empty()" is better than using "size() == 0".
Signed-off-by: Uli Schlachter <psychon@znc.in>
CTCP requests can't contain spaces so it's useless to specify rules for those.
This doesn't affect any of the existing callers because those use Token(0) for
generating the first argument to this function.
Signed-off-by: Uli Schlachter <psychon@znc.in>
All the places that add entries to the CTCPReplies map use CString::Token(0) to
split the first token away. This means it is impossible for this to contain
spaces. Now this means that it is pointless to look up the full CTCP request in
the CTCPReplies map because it can't contain any matching item.
Signed-off-by: Uli Schlachter <psychon@znc.in>
We are using a vanilla version of Csocket again. Previously, our copy of
Csocket.h had a new '#include "zncconfig.h"'.
The other changes are mostly cleanup for various compiler warnings. The switch
from inet_ntoa() to inet_ntop() is for thread-safety reasons.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If you did ./configure --enable-tcl, tcl wasn't actually enabled because
--enable-extra was missing, That's less than optimal.
Just moving modtcl out of modules/extra solves this problem.
Big thanks go to zynox/kylef for noticing this!
Signed-off-by: Uli Schlachter <psychon@znc.in>
When ChanServ ops someone in a channel without joining first, znc didn't call
modules for this event, because it couldn't figure out a CNick* instance to use
Instead, the module hooks are now executed with a temporary CNick instance which
is created by CIRCSock anyway.
Big thanks to Robby for reporting this and helping me test it!
Signed-off-by: Uli Schlachter <psychon@znc.in>
The explanation for the arguments for AddPort and DelPort can still be reached
via e.g. "/znc addport". Removing this makes the output from /znc help a lot
smaller.
Signed-off-by: Uli Schlachter <psychon@znc.in>
During shutdown, the global list of sessions is destroyed. The new multimap
which counts sessions per address is also destroyed. However, they are destroyed
in unspecified order. This is not what we want because destructing the session
map also destroyed all the sessions which then has to access the sessions-per-ip
multimap. This obviously crashes if the multimap was already destroyed.
The fix here is to introduce a new class that contains both of those maps and
makes sure all the sessions are destroyed before the maps are destroyed
themselves. I hope this description makes some sense...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2264 726aef4b-f618-498e-8847-2d620e286838