Commit Graph

1370 Commits

Author SHA1 Message Date
psychon 273d72c605 Add a Clear() function to CTable and make the base class protected
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1230 726aef4b-f618-498e-8847-2d620e286838
2008-09-29 14:46:06 +00:00
psychon 3014ae5dcb Remove CSocket::m_sLabel since it isn't really used at all
It doesn't really make much sense either, because Csock already has contains
a socket name member which can be used for this. This is exactly what this
patch does.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1229 726aef4b-f618-498e-8847-2d620e286838
2008-09-29 13:34:42 +00:00
kroimon 051e1f81d8 Enhanced the /znc command to optionally accept commands.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1228 726aef4b-f618-498e-8847-2d620e286838
2008-09-29 13:33:15 +00:00
kroimon 8c2fc5180e Removed redundant checks for m_pUser in CClient::UserCommand()
One check in line 19 should be enough.
See also rev 1220.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1227 726aef4b-f618-498e-8847-2d620e286838
2008-09-28 19:46:12 +00:00
kroimon b757a318f1 Introduced CString::TrimPrefix() and CString::CaseCmp() for parsing targets.
Dropped all occurences of strncasecmp() and
simplified the detection of messages targeting modules.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1226 726aef4b-f618-498e-8847-2d620e286838
2008-09-28 19:30:20 +00:00
psychon 583b91f719 Update to latest Csocket
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1225 726aef4b-f618-498e-8847-2d620e286838
2008-09-28 17:17:46 +00:00
kroimon e693acaa66 Added CString::TrimPrefix() and CString::TrimSuffix()
These functions remove prefix/suffix strings if possible.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1224 726aef4b-f618-498e-8847-2d620e286838
2008-09-28 16:59:28 +00:00
psychon 038961359e Print warnings in CTable if you feed it with unknown columns
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1223 726aef4b-f618-498e-8847-2d620e286838
2008-09-28 16:55:27 +00:00
psychon fd92e65b70 Add CClient::PutStatus(const CTable&) and use it everywhere
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1222 726aef4b-f618-498e-8847-2d620e286838
2008-09-28 12:05:49 +00:00
kroimon d6c34d2441 Fixed the CALLMOD macro in Client.cpp
Simple copy&paste error

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1221 726aef4b-f618-498e-8847-2d620e286838
2008-09-28 11:53:30 +00:00
kroimon cc00aa23c2 Removed thousands of redundant checks for m_pUser in CClient::ReadLine().
We already checked for it on line 144 which should be enough.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1220 726aef4b-f618-498e-8847-2d620e286838
2008-09-28 01:03:06 +00:00
kroimon 3b8134c3b0 Another whitespace/tab mixup fix.
Hopefully the last one...
Again, no functional changes in this commit.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1219 726aef4b-f618-498e-8847-2d620e286838
2008-09-27 14:42:34 +00:00
kroimon 1eaac2835b Renamed UseHiddenHost to UseCloakedHost to ensure consistency.
Thanks to fred for noticing this.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1218 726aef4b-f618-498e-8847-2d620e286838
2008-09-27 12:24:01 +00:00
kroimon 946add25c2 Added the Q module which allows the user to auth with QuakeNet's Q bot.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1217 726aef4b-f618-498e-8847-2d620e286838
2008-09-27 09:52:00 +00:00
kroimon c5ce187e0f Added descriptive lines to the LISTMODS and LISTAVAILMODS commands.
Also did a few minor style changes.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1216 726aef4b-f618-498e-8847-2d620e286838
2008-09-26 12:52:07 +00:00
kroimon 6766b32e1b Fixed some trailing whitespace / tab mixups and adjusted MD5.cpp to our coding guidelines.
This commit includes absolutely no changes in functionality, only pure cleanup.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1215 726aef4b-f618-498e-8847-2d620e286838
2008-09-26 12:51:36 +00:00
psychon 83dc2d9bd3 Set the client's nick name to our IRC nick when it connects to ZNC
The assumption here is that clients parse raw 001 to get their actual nick.
This worked before because nothing relied on CClient's idea of the users' nick.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1214 726aef4b-f618-498e-8847-2d620e286838
2008-09-21 12:54:10 +00:00
psychon 0e403e318e Small optimization to starting the connect user timer
Now the connect user timer is only started when the user which was disconnected
from IRC wants to reconnect, not always.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1213 726aef4b-f618-498e-8847-2d620e286838
2008-09-21 12:51:43 +00:00
psychon 9e68cd3558 Fix compilation with gcc 4.3.1 is ssl is disabled
The gcc devs cleaned up their includes again. Some openssl header pulled in the
needed includes, too, but this obviously doesn't help if ssl is disabled.

Thanks to sebastinas for reporting and to fred and the-me for testing.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1212 726aef4b-f618-498e-8847-2d620e286838
2008-09-21 08:02:15 +00:00
kroimon f1e6a41d83 Ignore messages to ourself when being disconnected from IRC.
This suppresses "Your message to [yournick] got lost,..." messages when lagbars try to send notices to their own nick but ZNC is disconnected from IRC.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1211 726aef4b-f618-498e-8847-2d620e286838
2008-09-20 16:00:26 +00:00
psychon 120c1cedf2 Import the dark-clouds webadmin skin bigpresh made. Thanks :)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1210 726aef4b-f618-498e-8847-2d620e286838
2008-09-19 17:24:38 +00:00
psychon cad1ee5367 Keepnick: Dont forward nick change errors which we generated ourselves
This blocks 433 replies from the irc server if the keepnick module tries
to change our nick. This way the user isn't flooded with those errors.
Oh and the actual logic is a little more complicated than this...

This patch is inspired and implemented by SilverLeo. Thanks :)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1209 726aef4b-f618-498e-8847-2d620e286838
2008-09-18 19:58:53 +00:00
psychon d4cd83fdf3 autoconf and m4 both suck (autoconf choked on some comma and messed up badly after that)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1208 726aef4b-f618-498e-8847-2d620e286838
2008-09-18 18:16:49 +00:00
psychon 3866bdd9f7 Revert rev 1204
Well... Not a complete revert, the error messages are improved for our friendly
debian users who cant find -dev packages by themselves. -.-

It turns out that on some arches (namely sparc64) libssl depends on libcrypto,
but doesn't link to it. This means that order is important when checking for
these libs. (Currently the check for libssl fails due to unresolved symbols)

Thanks to fred for reporting this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1207 726aef4b-f618-498e-8847-2d620e286838
2008-09-18 17:52:10 +00:00
psychon 29dab181df Add --disable-optimization flag to configure to remove -O2
PS: This also kills -fomit-frame-pointer. If GCC doesn't add it on itself,
    we don't do it either.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1206 726aef4b-f618-498e-8847-2d620e286838
2008-09-16 13:33:19 +00:00
psychon debe3ec335 Makefile: Make all output files depend on the Makefile itself
If you now rerun ./configure (e.g. for a different --prefix), everything
will be recompiled.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1205 726aef4b-f618-498e-8847-2d620e286838
2008-09-14 17:57:15 +00:00
psychon 69a429bca0 Reorder some openssl library checks in configure
Now libssl is checked before libcrypto. The idea behind this is that an error
message about missing libssl is easier to understand and fix than one saying
libcrypto is missing.
Hopefully people can now find the right dev package to install without
asking us.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1204 726aef4b-f618-498e-8847-2d620e286838
2008-09-14 14:07:14 +00:00
psychon 258793168b Bugfix in keepnick: PutUser() vs PutModule() screwup
Sorry, my bad.
Thanks to SilverLeo for finding and fixing this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1203 726aef4b-f618-498e-8847-2d620e286838
2008-09-14 06:05:23 +00:00
kroimon 57f4288c00 Renamed String.h and String.cpp to ZNCString.h and ZNCString.cpp
and updated all references to these files.

This became neccessary to solve problems on case-insensitive file-systems like Windows and MacOS X.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1202 726aef4b-f618-498e-8847-2d620e286838
2008-09-13 16:38:41 +00:00
psychon 613c87a46e Increase the version number to 0.061
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1201 726aef4b-f618-498e-8847-2d620e286838
2008-09-13 15:46:29 +00:00
psychon 8ab24030bc Increase the version number to 0.060
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1199 726aef4b-f618-498e-8847-2d620e286838
znc-0.060
2008-09-13 15:41:25 +00:00
psychon 87a368cb64 Improve both, the code's and the debug output's easy-to-readyiness
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1198 726aef4b-f618-498e-8847-2d620e286838
2008-09-12 15:41:12 +00:00
psychon 6ded64a177 Print a message when SIGHUP is caught
This is SilverLeo's idea, not mine! ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1197 726aef4b-f618-498e-8847-2d620e286838
2008-09-12 15:35:46 +00:00
psychon 92fb0ac62f Small cleanup, removed two unused variables
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1196 726aef4b-f618-498e-8847-2d620e286838
2008-09-12 12:55:03 +00:00
kroimon b14156a5db partyline: Adjusted the hostmask for actions from rottenboy.com to znc.in to ensure uniformity to the rest of znc. See also commit 1181.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1195 726aef4b-f618-498e-8847-2d620e286838
2008-09-10 14:24:07 +00:00
psychon 83ff385000 Fix '/msg *status disconnect' to *really* disconnect from IRC
Before this commit, if a connection attempt was still going on, that attempt
wasn't aborted. This is now fixed.

This was reported by Kuja, thanks!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1194 726aef4b-f618-498e-8847-2d620e286838
2008-09-09 15:54:34 +00:00
psychon 85845556cd Make ./configure --help output look a little better
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1193 726aef4b-f618-498e-8847-2d620e286838
2008-09-07 16:25:11 +00:00
kroimon fa57b9eb54 Added module 'autocycle' to replace the old core's functionality.
Credits to both psychon and kroimon

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1192 726aef4b-f618-498e-8847-2d620e286838
2008-09-07 11:50:43 +00:00
kroimon d1b3c2b94d Removed AutoCycle from core
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1191 726aef4b-f618-498e-8847-2d620e286838
2008-09-07 11:23:57 +00:00
psychon df27598832 chansaver: Save channel keys (+k) again, core doesn't do it anymore on its own
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1190 726aef4b-f618-498e-8847-2d620e286838
2008-09-05 19:46:43 +00:00
psychon 219ae6a572 Add new module call OnMode()
It's basically OnRawMode() but once per single mode.
Oh and this also fixes a problem where ZNC lost track of chan modes with params
(See hunk in CChan::AddMode).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1189 726aef4b-f618-498e-8847-2d620e286838
2008-09-04 10:28:19 +00:00
psychon 57bdb554a9 I was told this is confusing, so let's clean this up (/me waves at eTeen)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1188 726aef4b-f618-498e-8847-2d620e286838
2008-09-03 16:24:08 +00:00
psychon 85a70a418c Add JoinTries and MaxJoins config options to webadmin
This also changes the layout of the default skin a little, because it was
a little messed up. I still don't like the result, but meh, send patches!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1187 726aef4b-f618-498e-8847-2d620e286838
2008-09-03 14:28:18 +00:00
psychon fe44108d90 Fix some channel key-related mess ups.
ZNC used to keep track of two channel keys: The current one from the config and
the last one it got from a +k channel mode (/mode #chan is done on join).
The +k one, if it was known, always overwrote the config one and thus the one
from the config doesnt need to be saved anymore.

This patch now makes ZNC only use one var to hold the current channel key
and this key is NOT overwritten for +k on channels.

The reason for the last change: Stupid quakenet. (RFC, anyone?)
In /mode replies quakenet always shows '*' as channel key, if one is set.
This whole patch started with someone reporting that ZNC kept forgetting the
current channel key and used '*' instead...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1186 726aef4b-f618-498e-8847-2d620e286838
2008-09-02 17:25:37 +00:00
psychon 0316c6a1df Add OnUserTopicRequest() for topic requests
OnUserTopic() used to try to handle this, but it really failed to...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1185 726aef4b-f618-498e-8847-2d620e286838
2008-09-02 12:39:18 +00:00
kroimon 41fce82fc8 Added myself ;)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1184 726aef4b-f618-498e-8847-2d620e286838
2008-08-31 18:01:44 +00:00
psychon 00fcf767a7 Keep the traffic stats more up-to-date (/msg *status traffic)
This now also adds the traffic caused by webadmin, schat and dcc bouncing
to the stats.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1183 726aef4b-f618-498e-8847-2d620e286838
2008-08-31 07:21:21 +00:00
psychon 5fa8d03d2b Handle clients in CModules the same way users are
This should remove some additional complexity, but I doubt one can
benchmark these savings...

BTW: Here is what I found out on how this works:
The user module manager (CModules) always has m_pUser set to NULL which means
that it never touches its module's user pointer. That way, the modules
always have the correct pointer.

For global modules, m_pUser is set on some calls. This pointer is then
passed on to the modules and reset afterwards.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1182 726aef4b-f618-498e-8847-2d620e286838
2008-08-30 19:46:28 +00:00
psychon 02beef2e07 Use znc.in instead of znc.com
No cookie for that domain catcher at znc.com!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1181 726aef4b-f618-498e-8847-2d620e286838
2008-08-30 09:00:21 +00:00
psychon 687d7ae894 Close listening ports if we have too many open fds
The alternative to this is a busy loop which is a Bad Idea (tm).
Next rehash will reopen the port anyway, so meh, this is the best we can do.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1180 726aef4b-f618-498e-8847-2d620e286838
2008-08-30 08:35:11 +00:00