Custom modules compiled for older ZNC can crash ZNC.
Because now ZNC checks for list of available modules on startup in order
to check whether it's installed or not, it can crash right on startup.
Now it outputs nice message about checking for modules before that.
See github issue #172
Only his changes to the core are presented here.
Unfortunately, the skin itself looks ugly on Opera,
and simply doesn't work on Firefox...
Merge branch 'master' into znc-ation
Conflicts:
modules/data/lastseen/tmpl/lastseen_WebadminUser.tmpl
modules/data/webadmin/tmpl/settings.tmpl
Commit b1593238d5 started using the module pointer before the NULL
check. This caused crashes whenever someone (even without a login!) accessed a
web page on znc for a module which didn't exist.
Thanks to J0rd4n` for reporting this to us.
Signed-off-by: Uli Schlachter <psychon@znc.in>
A malicious IRCd could send a WHO reply for a nick which consisted completely
out of prefix characters (thus an empty nick). In this case
std::string::find_first_of() would return std::string::npos. This argument would
make std::string::substr() throw an exception and kill the process.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead we fill the JOIN line up with as many channels as we can fit in
an IRC line. Rate limiting is done per command now, making MaxJoins
unnecessary.
A DNS thread should never handle any kind of signal. The main thread is
responsible for handling signals and it does so without any kind of locking.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When a DNS thread is done with its lookup, instead of existing immediately, it
now waits for another DNS lookup to do instead. This avoids the cost of
starting/stopping threads all the time.
To make sure that (for whatever reason) the number of waiting threads doesn't
get too high, threads exit if there are more than two DNS threads idling around
with nothing to do.
Fixes#132.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This fixes a bug where sending anything to a client, such as with
PutModule will fail because it will refer to the new nick before the
client knows about it. The watch module did this.
Default this boolean to true incase there are no networks to loop over. This
will silently drop any network modules for the user, but since there are no
networks anyway it doesn't really matter.