Commit Graph

1298 Commits

Author SHA1 Message Date
silverleo cc3fcc17bb Block pong replies that we requested.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1309 726aef4b-f618-498e-8847-2d620e286838
2008-12-29 18:43:47 +00:00
silverleo 05b259baef Append an * to the current server in *status listservers
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1308 726aef4b-f618-498e-8847-2d620e286838
2008-12-29 18:11:17 +00:00
psychon 8728c994db Make CChan::AddNicks() easier to understand and probably a little faster
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1307 726aef4b-f618-498e-8847-2d620e286838
2008-12-29 09:32:36 +00:00
psychon 751f267f30 Improve CFile::ReadLine() a little
IMHO it is now a little clearer how this function works and it might be
a little faster. Biggest change is that we now read 4k of the file at once
instead of reading it in 64byte chunks. I doubt that this causes a lot more
memory usage, because CFile instances usually dont live for long, but it
should really lower the number of syscalls we need for reading a file.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1306 726aef4b-f618-498e-8847-2d620e286838
2008-12-28 13:03:43 +00:00
psychon fe86b92359 Use CSocket instead of Csock in the email module
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1305 726aef4b-f618-498e-8847-2d620e286838
2008-12-27 09:06:49 +00:00
psychon 1312e6512b Make watch save its settings and add CModule::ClearNV()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1304 726aef4b-f618-498e-8847-2d620e286838
2008-12-26 15:12:25 +00:00
psychon 458baa17f5 Some cleanup and fixes to schat
- schat now works again (yay)
- it now uses CSocket instead of Csock directly
- list only displays schat's own sockets
- other minor stuff


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1303 726aef4b-f618-498e-8847-2d620e286838
2008-12-25 08:48:59 +00:00
psychon dd96f21d17 Make CNick smaller
This removes some not-so-important cache and uses a CString instead of a
set<unsigned char> for saving the flags this nick has (op, voice, ...).
set is huge!

Before the virtual removal (r1300), CNick had 144 bytes, without the virtuals
it only took 112 bytes. Now after this commit it is down to 40 bytes. (amd64)

Happy Christmas tomaw ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1302 726aef4b-f618-498e-8847-2d620e286838
2008-12-24 10:34:07 +00:00
psychon 7ba58aba72 Make CChan smaller
This is mostly done by removing unused members, but there is also removes a
cache which saved how many opped, voiced etc users are on a channel.
This shouldn't result in a big slowdown, since this data is only ever used
for /msg *status listchans.
Also, this replaces the API to access this data with a version which should
be faster especially for big channels.

On amd64 the size of CChan was 600 bytes before and is 400 bytes now.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1301 726aef4b-f618-498e-8847-2d620e286838
2008-12-23 10:07:54 +00:00
psychon acd854eb1c Remove virtual where it makes no sense
This commit actually saves memory, since some classes no longer contain a
pointer to their vtable!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1300 726aef4b-f618-498e-8847-2d620e286838
2008-12-22 17:22:34 +00:00
psychon fd5dd4c3b6 Don't append a slash to the paths returns from CZNC::Get*Path()
The old versions didn't do this either and thus we used two slashes.
While this doesn't hurt, it doesn't look good either.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1299 726aef4b-f618-498e-8847-2d620e286838
2008-12-21 17:10:25 +00:00
silverleo 1785a03c71 Dont try to join our sticky channels when the irc connection is not available.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1298 726aef4b-f618-498e-8847-2d620e286838
2008-12-21 09:05:16 +00:00
silverleo 110485eaaf Changed ping timers and timeout settings to use more reasonable values. Also changed timeout type for irc and client sockets.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1297 726aef4b-f618-498e-8847-2d620e286838
2008-12-21 09:03:04 +00:00
psychon de3fb7f3dc Fix breakage from last commit, hope no one noticed it yet ;)
This happens when you merge branches to trunk in a different order than
you created them...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1296 726aef4b-f618-498e-8847-2d620e286838
2008-12-20 20:21:14 +00:00
psychon baab007f2b Allow adding a server multiple times if a different port or pass is used
This also moves the check for multiple servers
from CClient to CUser::AddServer().

The idea for this is from cnu, thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1295 726aef4b-f618-498e-8847-2d620e286838
2008-12-20 19:59:36 +00:00
psychon d254240866 Remove some unused code for ipv6 from CServer (and from CUser)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1294 726aef4b-f618-498e-8847-2d620e286838
2008-12-19 13:43:56 +00:00
psychon 979f2651f3 Add some API to CModule
This let's module have access to all their active timers/sockets.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1293 726aef4b-f618-498e-8847-2d620e286838
2008-12-18 16:22:31 +00:00
psychon 804b259f69 Fix a bug introduced in r1289
If the config dir (<datadir>/configs) didn't exist yet, ZNC didn't bother
creating it and thus failed to do write a config.

Thanks to m4v for testing a nightly and for reporting this bug.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1292 726aef4b-f618-498e-8847-2d620e286838
2008-12-17 15:36:47 +00:00
psychon e493c23243 awaynick: Set awaynick on connect, not some time after that
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1291 726aef4b-f618-498e-8847-2d620e286838
2008-12-14 20:27:36 +00:00
psychon d97ef37d27 Bugfix: Only reply to a client's MODE request if we actually know the answer
(Plus some indent fixup)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1290 726aef4b-f618-498e-8847-2d620e286838
2008-12-13 17:01:55 +00:00
psychon 4b1fbab6eb Remove CZNC::GetConfPath() and rework GetModPath() and GetUserPath()
This removes some unneeded variables.
Idea by kroimon.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1289 726aef4b-f618-498e-8847-2d620e286838
2008-12-12 15:38:57 +00:00
psychon c03bd91589 Update to latest Csocket and use its new init interface
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1288 726aef4b-f618-498e-8847-2d620e286838
2008-12-10 15:53:07 +00:00
silverleo 9bec4b8048 Fix a bug introduced in r1280
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1287 726aef4b-f618-498e-8847-2d620e286838
2008-12-09 20:25:34 +00:00
psychon 8db106bf6b Remove our only getcwd() call
We now no longer depend on PATH_MAX which is not defined by POSIX.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1286 726aef4b-f618-498e-8847-2d620e286838
2008-12-07 14:18:23 +00:00
psychon c7cf105e15 Add VERSION_MAJOR, too (for consistency)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1285 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 21:13:14 +00:00
psychon 79274a7a47 Add a VERSION_MINOR define which can be used in preprocessor comparisons.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1284 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 20:19:10 +00:00
psychon 08088be7d6 Add traffic tracking support to CSocket
Now every module that uses CSocket automatically gets its generated traffic
counted. Those which use Csock directly should be shot and burried anyway ;)

This adds CModule::IsGlobal().


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1283 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 19:56:38 +00:00
psychon 03a13f6d51 Always show a message for active schat when a user reconnects
This was the user sees at once which schats are active.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1282 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 16:13:37 +00:00
psychon 3c088134f5 Minor stylistic fixes for schat
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1281 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 16:07:00 +00:00
psychon e6007747d7 Handle read errors in CFile::Copy()
This fixes an endless loop (However, I don't know how it happened).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1280 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 14:49:56 +00:00
psychon da4181617e Use RTLD_LOCAL instead of RTLD_GLOBAL when reading module descriptions
This might save some work for the libc and at least I can't see
how this would break anything.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1279 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 14:39:48 +00:00
psychon 66a6f91116 Increase the version number to 0.063
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1278 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 14:09:51 +00:00
psychon 16aabebcbf Increase the version number to 0.062
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1276 726aef4b-f618-498e-8847-2d620e286838
znc-0.062
2008-12-06 14:07:00 +00:00
psychon 80edd58f4f Rewrite the author file (= use a new format)
No one was removed, flakes and Freman were added.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1275 726aef4b-f618-498e-8847-2d620e286838
2008-12-03 16:17:35 +00:00
psychon d75a32d335 Use AC_PATH_PROG instead of using 'which' for finding perl
This commit should have a low impact and I can't really imagine
how it would break something.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1274 726aef4b-f618-498e-8847-2d620e286838
2008-12-01 18:23:40 +00:00
silverleo 942eb63a7c Revert changes from rev1125 so we compile on fbsd 4.11
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1273 726aef4b-f618-498e-8847-2d620e286838
2008-11-27 16:34:51 +00:00
silverleo 9952e8d2c5 Added OnTimerAutoJoin(). Patch from Freman. Thanks :)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1272 726aef4b-f618-498e-8847-2d620e286838
2008-11-25 10:53:40 +00:00
silverleo c71565103c Added OnIRCRegistration(). Patch from Freman. Thanks :)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1271 726aef4b-f618-498e-8847-2d620e286838
2008-11-24 17:56:34 +00:00
silverleo f4e36a0b17 Enable IPv6 support by default
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1270 726aef4b-f618-498e-8847-2d620e286838
2008-11-20 11:45:51 +00:00
silverleo 62b57965cd This fixes a compile error with gcc 4.4 noted in debian bug report #504946
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1269 726aef4b-f618-498e-8847-2d620e286838
2008-11-11 09:44:14 +00:00
psychon be72295337 Fix --disable-modules, someone forgot an #ifdef :(
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1268 726aef4b-f618-498e-8847-2d620e286838
2008-10-31 19:10:51 +00:00
psychon a10acfeddc Seems like someone messed up when touching configure.in, fix
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1267 726aef4b-f618-498e-8847-2d620e286838
2008-10-30 17:11:55 +00:00
psychon db21f88584 Rename OnUserAttached and OnUserDetached and add OnClientConnect
OnUserAttached is renamed to OnClientLogin and
OnUserDetached to OnClientDisconnect.
This adds some new function with different arguments for the old names to cause
warnings from -Woverloaded-virtual while compiling.

This patch also adds OnClientConnect() which is called when the low-level
raw connection is established. (No SSL-handshake was done at this point yet!)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1266 726aef4b-f618-498e-8847-2d620e286838
2008-10-29 17:26:30 +00:00
psychon e85ed684ea Some member vars of CWebAdminMod should really be local vars to OnLoad()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1265 726aef4b-f618-498e-8847-2d620e286838
2008-10-28 17:21:53 +00:00
psychon dfaa0c34fc Fix the behaviour change of the last commit
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1264 726aef4b-f618-498e-8847-2d620e286838
2008-10-27 19:34:03 +00:00
psychon b312a64c9d Partyline: clean up when a force-joined user is deleted
The old code didn't properly clean up after deleted users :(


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1263 726aef4b-f618-498e-8847-2d620e286838
2008-10-27 19:21:08 +00:00
silverleo 94f6e2cf79 Change OnStatusCommand to use non-const variable like most of the EModRet modulecalls
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1262 726aef4b-f618-498e-8847-2d620e286838
2008-10-26 19:47:17 +00:00
psychon 1701b39399 modperl: Show the actual compiler flags and get rid of the warnings
We now first run the perl command to get the compiler flags and display
those when compiling modperl, so we now what's going on.

Plus this also uses -Wno-write-strings to disabled all the perl compiler
warnings.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1261 726aef4b-f618-498e-8847-2d620e286838
2008-10-26 18:58:13 +00:00
psychon d57f706523 Make schat's showsocks module admin-only
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1260 726aef4b-f618-498e-8847-2d620e286838
2008-10-24 17:12:06 +00:00
psychon 680127165a Improve webadmin's error messages
I just got this: (binding to ::1 on an ipv4-only build)
Module [webadmin] aborted: Could not bind to port 8080: No such file or directory
Module [webadmin] aborted: Could not bind to port 8080: Success


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1259 726aef4b-f618-498e-8847-2d620e286838
2008-10-23 15:20:09 +00:00