It's getting a common pattern to call AsLower() or MakeLower() on
the arguments passed to WildCmp(), we might as well add this for
convenience. It's tempting to make it case-insensitive by default,
since pretty much any IRC related comparison should be, but that
could potentially break some existing code.
This fixes the following error (copied from config.log):
conftest.cpp:49:14: error: no previous declaration for 'void
test_template_alias_sfinae::test()' [-Werror=missing-declarations]
Signed-off-by: Uli Schlachter <psychon@znc.in>
(cherry picked from commit 2d1336dcf3)
Current clearbufferonmsg clears buffer on some user actions (OnMsg,
OnCTCP, OnAction, OnNotice, OnPart, OnTopic). And user can't change
this fixed built-in rule.
This built-in rule to clear buffer is too inflexible. So, this
extends clearbufferonmsg to satisfy more users on different
situations.
Add args to clearbufferonmsg to allow that user choose callbacks to clear.
msg - clear on OnUserMsg callback
ctcp - clear on OnUserCTCP callback
action - clear on OnUserAction callback
notice - clear on OnUserNotice callback
part - clear on OnUserPart callback
topic - clear on OnUserTopic callback
quit - clear on OnUserQuit callback
all - set all options above
By default, clear on msg, ctcp, action, notice, part, topic. (except
quit for backward compatibility).
Example usage in znc.conf:
[set all options]
LoadModule = clearbufferonmsg all
[on quit and part]
LoadModule = clearbufferonmsg !all quit part
Add OnUserQuit() callback. On smartphone, user doesn't want to see
same lines repeatedly. But, meanwhile, user doesn't want to miss lines
when connection was lost.
To do it, this uses OnUserQuit() callback. With this callback,
clearbufferonmsg can clear buffer if user quited client explicitly.
And when connection was lost, buffer is still not cleared.
These functions shouldn't be visible outside of this file. This was caught by
-Werror=missing-declarations.
Signed-off-by: Uli Schlachter <psychon@znc.in>
From pthread_cond_wait()'s man page:
When using condition variables there is always a boolean predicate involving
shared variables associated with each condition wait that is true if the
thread should proceed. Spurious wakeups from the pthread_cond_wait() or
pthread_cond_timedwait() functions may occur. Since the return from
pthread_cond_wait() or pthread_cond_timedwait() does not imply anything about
the value of this predicate, the predicate should be re-evaluated upon such
return.
Fix ~CThreadPool() to account for this possibility.
Signed-off-by: Uli Schlachter <psychon@znc.in>
1. The same functionality is achievable via
./configure LDFLAGS=-L/foo/lib CXXFLAGS=-I/foo/include PKG_CONFIG_PATH=/foo/lib/pkgconfig
2. Only openssl had this special flag, but not python, not zlib, etc.
3. It's confusing, lots of people try --with-openssl=/usr/bin/openssl
This fixes the following error (copied from config.log):
conftest.cpp:49:14: error: no previous declaration for 'void
test_template_alias_sfinae::test()' [-Werror=missing-declarations]
Signed-off-by: Uli Schlachter <psychon@znc.in>