No really, over there! You really should take a look. Come on, I'm not messing
with you. There really are those IPU (invisible pink unicorns) right behind you.
DarthGandalf found them. Oh, now they flew away. :(
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1850 726aef4b-f618-498e-8847-2d620e286838
It's only called for stuff defined in that user's section. The stuff outside of
a user section still can only be caught by global modules.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1849 726aef4b-f618-498e-8847-2d620e286838
If a user who is currently logged in to WebMods is deleted, his CWebSession
still kept a stale CUser pointer around. The next time he loaded a web page,
Bad Things(tm) happened.
This is fixed by deleting all of a user's sessions when that user is deleted.
Thanks to DarthGandalf for spotting the bug and writing the patch.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1827 726aef4b-f618-498e-8847-2d620e286838
Now that we have the new ServerThrottle, we should be able to live with this
higher connect rate. Connecting lots of users is still awfully slow. :(
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1822 726aef4b-f618-498e-8847-2d620e286838
Before this, --makeconf used "Listen" if you said "no" to "do you want ipv6?"
and "Listen6" else. Since yesterday, "Listen" means "v4 and v6 please" (thanks
to DarthGandalg) which means we now use "Listen4" for "no" and "Listen" else.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1817 726aef4b-f618-498e-8847-2d620e286838
"Listen6" and "Listen4" now do what the name implies and "Listen" listens on
both ipv4 and ipv6 (unless a bind host was set which forces something
different).
This also changes webadmin appropriately.
Thanks to DarthGandalf for the idea and the patch.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1816 726aef4b-f618-498e-8847-2d620e286838
This broke webadmin, changed CString::Token()'s behavior possibly breaking a lot
of stuff just before a release and added an unused config entry.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1748 726aef4b-f618-498e-8847-2d620e286838
This will keep people from loading the sample or saslauth (or away) modules and thereby avoid stupid questions.
Instead of listing and asking for all modules, we only show the most widely used ones plus "And X other (uncommon) modules. You can enable those later.".
To add a module, append its name to the array in CZNC::FilterUncommonModules().
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1706 726aef4b-f618-498e-8847-2d620e286838
That way new ConnectDelay settings are applied immediately, not after the timer
is restart next due to sth else.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1679 726aef4b-f618-498e-8847-2d620e286838
ISpoofFormat now can be used with e.g. %user% which allows some kind of
poor-man's DenySetIdent (force ident to be user name).
For backward compatibility, if ExpandString() doesn't change the string we just
replace all "%" with the user's ident.
Thanks to DarthGandalf for the idea and the patch.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1670 726aef4b-f618-498e-8847-2d620e286838
If this option is set to an ip address, this one is used as the local address
for DCC connections. This can e.g. be used to "fix" DCC bouncing with ipv6
connections. Without it, this just more or less fails badly.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1647 726aef4b-f618-498e-8847-2d620e286838
CZNC::~CZNC() set its pointer to the CConnectUserTimer to NULL and then called
the manager's Cleanup(). If some destructor that is called from here then calls
EnableConnectUser(), a new CConnectUserTimer is created and its address is
saved. But since the manager is destroying all timers, this pointer will soon
become dangling and might crash us later on.
This is solved by clearing CZNC's pointer in CConnectUserTimer's destructor.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1624 726aef4b-f618-498e-8847-2d620e286838
This imports the sha256 code from http://www.ouah.org/ogay/sha2/ (The other
hashes from sha-2 were removed). sha256 is a much stronger hashing algorithm
than md5 is (There were successful birthday attacks against md5).
All the code now defaults to creating sha256 salted hashes (The salting used is
the same as before).
Old znc.conf files can still be read.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1618 726aef4b-f618-498e-8847-2d620e286838
Everything which isn't a CClient with a successful login counts as an
unidentified connection in this context. Modules who don't want this kind of
limit on their listening sockets can override CSocket::ConnectionFrom(), but
their sockets will still count towards this limit.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1561 726aef4b-f618-498e-8847-2d620e286838
If a user is deleted while it is trying to connect to an IRC server, the IRC
socket wasn't deleted together with the user. At some later point in time, the
IRC socket will try to use the user object, which was already freed by now.
Fix this by erasing IRC sockets together with their user object.
Thanks to cnu for reporting this.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1557 726aef4b-f618-498e-8847-2d620e286838
The last commit broke the order in which the traffic stats used to be displayed
and it turns out that KiNgMaR cannot live with that, so now we are back to the
old order.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1523 726aef4b-f618-498e-8847-2d620e286838
We now have a central function CZNC::GetTrafficStats() which does all the ugly
stuff and just returns the data which the caller can then display. We now also
include all unknown sockets (e.g. imapauth or webadmin sockets) in the traffic
stats in the "<ZNC>" section.
The only downside to all this gloriousness is that this breaks the ordering of
/msg *status traffic which is now sorted alphabetically which means that <ZNC>
<Users> and <Total> aren't anymore in the places in which they used to be.
I hope one can live with that...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1521 726aef4b-f618-498e-8847-2d620e286838
CZNC::ExpandConfigPath() handles an empty string as its argument quite well, so
make all those other places use this.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1469 726aef4b-f618-498e-8847-2d620e286838
Without this the restart after the config is written fails, because the file
name it wants to open went through ExpandConfigPath() twice. This lead to a
path like ./some-dir/configs/some-dir/configs.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1468 726aef4b-f618-498e-8847-2d620e286838
Added some error checking and fixes a bug where the exclusive lock we use on
the config file was removed. This was because we made the kernel allocate a
new inode for the config while our lock was still on the old version of the
config file. This should now be fixed.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1457 726aef4b-f618-498e-8847-2d620e286838
CZNC::Loop() never returns a value, the only way it can return is through
some throws (e.g. for restart or shutdown).
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1434 726aef4b-f618-498e-8847-2d620e286838