Via profiling ZNC it was found that much CPU time was spent inside FindSockByName()
which in turn was called by CUser::GetIRCSock():
w00t volunteered to write a patch to save that pointer inside CUser and
here is the result. Thanks.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1053 726aef4b-f618-498e-8847-2d620e286838
Those function were not modified. Only change is the name.
Those *Dir() functions really made no sense in CUtils when there is FileUtils
stuff. They really fit much better into here. I'll bet they'll make new friends
fast. I mean, why shouldn't they?
Uhm... sorry ;)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1044 726aef4b-f618-498e-8847-2d620e286838
If znc.conf was a regular file which we just couldn't open (chmod 0), ZNC
reported that it was already running on this config.
This patch fixes this message.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1033 726aef4b-f618-498e-8847-2d620e286838
This was generated via the following command:
cat <file> | \
tr "\n" "€"| \
sed -r 's/€[\t ]*\{€/ {€/g; s/\( */(/g; s/ *\)/)/g' | \
tr "€" "\n"
Thanks to SilverLeo for producing this mess :P
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1029 726aef4b-f618-498e-8847-2d620e286838
This saves us one whole open() :P
Honestly, this fixes some (stupid) locking problems with cygwin and shouldn't
hurt much otherwise (And no, cygwin still isn't supported yet).
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1020 726aef4b-f618-498e-8847-2d620e286838
The fake user rehashing uses was leaked completly (BAD)
Thanks to SilverLeo for reporting and x-x for making me track this one down :P
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@992 726aef4b-f618-498e-8847-2d620e286838
The ~/.znc/configs/backups/ directory quickly got quite big, so we don't do
that but instead only save on backup as ~/.znc/configs/znc.conf-backup
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@975 726aef4b-f618-498e-8847-2d620e286838
I don't think there is a high change that the file lock becomes available
in the short time we did loop and retry the lock, so that code served no
real purpose.
Also, this includes unistd.h in Utils.h which is needed for OpenBSD.
Thanks to fred for testing on his openbsd/sparc box.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@918 726aef4b-f618-498e-8847-2d620e286838
All the headers are now self-contained (g++ Header.h -o /dev/null).
Some system headers where moved to the .cpp they are actually needed in,
some of our own headers are includes less. (Especially MD5.h)
Headers are sorted alphabetically while in e.g. FileUtils.cpp FileUtils.h
is the first file included.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@915 726aef4b-f618-498e-8847-2d620e286838
When we ran CZNC::~CZNC() we called DeleteUsers() which called
RestartConnectUser(). Since we had already deleted that timer, we called
some already deleted class.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@908 726aef4b-f618-498e-8847-2d620e286838
These are mostly string casts, handling function's return value and some
weird warning about missing spaces on empty while loops.
These were reported by and fixed with Marcus Rueckert <darix@opensu.se>.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@904 726aef4b-f618-498e-8847-2d620e286838
Based on darix' patch I wrote this. Modperl's changes were not tested since I
didn't find someone who could test it. Well...
Ah and btw it regenerates configure
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@902 726aef4b-f618-498e-8847-2d620e286838
Other stuff included here:
- Always send the quit message when disconnecting from IRC
- Partly rewrite CConnectUserTimer::RunJob() for some de-uglification
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@874 726aef4b-f618-498e-8847-2d620e286838
DynamicSelectLoop checks when the next cron runs and sleeps until then (with an
upper and lower border).
To fix the connecting code it needed to be moved into a cron.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@860 726aef4b-f618-498e-8847-2d620e286838
This message is always displayed when the module returns (well, screw webadmin)
and this way a module can notify the user if it loaded but something unexpected
happened.
As you might guess, no one uses this ATM :)
Proposal comes from prozac
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@855 726aef4b-f618-498e-8847-2d620e286838
This way if we rewrite the config PidFile gets the same value it had when znc
was started.
-> we don't turn it into an absolute path which is bad if data dir is changed
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@839 726aef4b-f618-498e-8847-2d620e286838