]> jfr.im git - irc/rizon/znc.git/log
irc/rizon/znc.git
15 years agoIncrease the version number to 0.062 znc-0.062
psychon [Sat, 6 Dec 2008 14:07:00 +0000 (14:07 +0000)] 
Increase the version number to 0.062

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1276 726aef4b-f618-498e-8847-2d620e286838

15 years agoRewrite the author file (= use a new format)
psychon [Wed, 3 Dec 2008 16:17:35 +0000 (16:17 +0000)] 
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

15 years agoUse AC_PATH_PROG instead of using 'which' for finding perl
psychon [Mon, 1 Dec 2008 18:23:40 +0000 (18:23 +0000)] 
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

15 years agoRevert changes from rev1125 so we compile on fbsd 4.11
silverleo [Thu, 27 Nov 2008 16:34:51 +0000 (16:34 +0000)] 
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

15 years agoAdded OnTimerAutoJoin(). Patch from Freman. Thanks :)
silverleo [Tue, 25 Nov 2008 10:53:40 +0000 (10:53 +0000)] 
Added OnTimerAutoJoin(). Patch from Freman. Thanks :)

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1272 726aef4b-f618-498e-8847-2d620e286838

15 years agoAdded OnIRCRegistration(). Patch from Freman. Thanks :)
silverleo [Mon, 24 Nov 2008 17:56:34 +0000 (17:56 +0000)] 
Added OnIRCRegistration(). Patch from Freman. Thanks :)

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1271 726aef4b-f618-498e-8847-2d620e286838

15 years agoEnable IPv6 support by default
silverleo [Thu, 20 Nov 2008 11:45:51 +0000 (11:45 +0000)] 
Enable IPv6 support by default

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1270 726aef4b-f618-498e-8847-2d620e286838

15 years agoThis fixes a compile error with gcc 4.4 noted in debian bug report #504946
silverleo [Tue, 11 Nov 2008 09:44:14 +0000 (09:44 +0000)] 
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

15 years agoFix --disable-modules, someone forgot an #ifdef :(
psychon [Fri, 31 Oct 2008 19:10:51 +0000 (19:10 +0000)] 
Fix --disable-modules, someone forgot an #ifdef :(

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1268 726aef4b-f618-498e-8847-2d620e286838

15 years agoSeems like someone messed up when touching configure.in, fix
psychon [Thu, 30 Oct 2008 17:11:55 +0000 (17:11 +0000)] 
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

15 years agoRename OnUserAttached and OnUserDetached and add OnClientConnect
psychon [Wed, 29 Oct 2008 17:26:30 +0000 (17:26 +0000)] 
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

15 years agoSome member vars of CWebAdminMod should really be local vars to OnLoad()
psychon [Tue, 28 Oct 2008 17:21:53 +0000 (17:21 +0000)] 
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

15 years agoFix the behaviour change of the last commit
psychon [Mon, 27 Oct 2008 19:34:03 +0000 (19:34 +0000)] 
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

15 years agoPartyline: clean up when a force-joined user is deleted
psychon [Mon, 27 Oct 2008 19:21:08 +0000 (19:21 +0000)] 
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

15 years agoChange OnStatusCommand to use non-const variable like most of the EModRet modulecalls
silverleo [Sun, 26 Oct 2008 19:47:17 +0000 (19:47 +0000)] 
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

15 years agomodperl: Show the actual compiler flags and get rid of the warnings
psychon [Sun, 26 Oct 2008 18:58:13 +0000 (18:58 +0000)] 
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

15 years agoMake schat's showsocks module admin-only
psychon [Fri, 24 Oct 2008 17:12:06 +0000 (17:12 +0000)] 
Make schat's showsocks module admin-only

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1260 726aef4b-f618-498e-8847-2d620e286838

15 years agoImprove webadmin's error messages
psychon [Thu, 23 Oct 2008 15:20:09 +0000 (15:20 +0000)] 
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

15 years agoMake ZNC compile on Mac OS out of the box
psychon [Wed, 22 Oct 2008 19:40:51 +0000 (19:40 +0000)] 
Make ZNC compile on Mac OS out of the box

Thanks to ashikase for pointing out the needed linker and compiler flags.
Thanks to GiZMo for testing on his mac 10.5.4.

This also cleans up configure.in a little by adding appendMod.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1258 726aef4b-f618-498e-8847-2d620e286838

15 years agoSupport out-of-tree builds
psychon [Tue, 21 Oct 2008 17:41:52 +0000 (17:41 +0000)] 
Support out-of-tree builds

The autoconf documentation turned out to be helpful:
http://www.gnu.org/software/autoconf/manual/autoconf.html#Build-Directories

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1257 726aef4b-f618-498e-8847-2d620e286838

15 years agoSome changes to the vhost interface from *status
psychon [Mon, 20 Oct 2008 13:00:54 +0000 (13:00 +0000)] 
Some changes to the vhost interface from *status

This adds AddVHost, RemVHost and ListVHosts.
If this vhost list (which is the same webadmin uses for displaying drop-down
lists) is none-empty, then users can only set one of these vhosts via SetVHost.
If the list is empty, everything is allowed.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1256 726aef4b-f618-498e-8847-2d620e286838

15 years agoAdd znc-config --cxx and use it in znc-buildmod
psychon [Sun, 19 Oct 2008 16:31:26 +0000 (16:31 +0000)] 
Add znc-config --cxx and use it in znc-buildmod

Plus this makes sure that znc-buildmod tries to use the znc-config we installed
first, then others from $PATH.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1255 726aef4b-f618-498e-8847-2d620e286838

15 years agoReally use relative URLs in webadmin
psychon [Sat, 18 Oct 2008 12:51:25 +0000 (12:51 +0000)] 
Really use relative URLs in webadmin

I forgot the forms and the style sheets. Meh :(

Thanks to gencha for testing a snapshot and noticing that the forms are broken.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1254 726aef4b-f618-498e-8847-2d620e286838

15 years agoUse relative instead of absolute URLs in webadmin
psychon [Fri, 17 Oct 2008 16:27:18 +0000 (16:27 +0000)] 
Use relative instead of absolute URLs in webadmin

This should make it possible to use webadmin together with apache's mod_proxy.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1253 726aef4b-f618-498e-8847-2d620e286838

15 years agoFix webadmin to work with symlinks in the skins directory.
psychon [Thu, 16 Oct 2008 18:11:18 +0000 (18:11 +0000)] 
Fix webadmin to work with symlinks in the skins directory.

If dir is a symlink to a directory dir/.. is not the same as . which broke
webadmin.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1252 726aef4b-f618-498e-8847-2d620e286838

15 years agoSome tweaking and cleaning up to configure.in
psychon [Wed, 15 Oct 2008 18:36:08 +0000 (18:36 +0000)] 
Some tweaking and cleaning up to configure.in

- Make it clear to autoconf that we are C++ only. It now no longer checks for a
  C compiler which might save time on some boxes.
- Honour CPPFLAGS.
- Remove some unused vars from AC_SUBST.
- Add includes to CXXFLAGS instead of using $INCLUDES for this.
- Use autoconf macros instead of 'echo' for the 'checking for perl' message.
- Fix all warnings from 'autoconf -W all'.
- Use AC_CONFIG_SRCDIR for helping configure find the source dir.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1251 726aef4b-f618-498e-8847-2d620e286838

15 years agonickserv: Auto-save passwords when they are set and remove the 'show' command
psychon [Tue, 14 Oct 2008 17:28:10 +0000 (17:28 +0000)] 
nickserv: Auto-save passwords when they are set and remove the 'show' command

Passwords should be secret, so don't display them to everyone who asks.
The auto-save is there to make owine happy. ;)

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1250 726aef4b-f618-498e-8847-2d620e286838

15 years agoCatch 'throw UNLOAD' in the OnBoot module hook
psychon [Mon, 13 Oct 2008 18:53:43 +0000 (18:53 +0000)] 
Catch 'throw UNLOAD' in the OnBoot module hook

Before this ZNC died because of an uncaught exception :(

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1249 726aef4b-f618-498e-8847-2d620e286838

15 years agoMake httpsock (and thus webadmin) support client side caching of static files
psychon [Sun, 12 Oct 2008 15:49:03 +0000 (15:49 +0000)] 
Make httpsock (and thus webadmin) support client side caching of static files

If such a file is served (e.g. webadmin images) an ETag header is now generated.
When the browser needs the file again it sends the ETag back to us in an
If-None-Match header and the file isn't transfered again if the ETag still
matches. This should greatly reduce webadmin's traffic usage.

This also updates HTTPSock to sometimes generate a HTTP/1.1 reply
(ETag was added in HTTP/1.1).

This was successfully tested with Firefox 2 & 3 and IE7.
Konqueror failed badly (No If-None-Match header generated).

Thanks to flakes for having the idea, writing the patch and testing it.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1248 726aef4b-f618-498e-8847-2d620e286838

15 years agoRewritten and enhanced module simple_away.
kroimon [Sun, 12 Oct 2008 12:09:35 +0000 (12:09 +0000)] 
Rewritten and enhanced module simple_away.

* Added proper 'help' command
* Module now only sets back if it really have set you away
* Case-insensitive commands
* 'reason' command now shows both raw and expanded away reason
* some structural and syntactical cleanup

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1247 726aef4b-f618-498e-8847-2d620e286838

15 years agoMake --makeconf check for znc.pem and generate it if it's missing
psychon [Sat, 11 Oct 2008 15:43:30 +0000 (15:43 +0000)] 
Make --makeconf check for znc.pem and generate it if it's missing

This patch is based on ideas and an actual patch from
the-me aka Patrick Matthäi. Thanks.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1246 726aef4b-f618-498e-8847-2d620e286838

15 years agoUse the new CString constructor in various places to make them more readable
psychon [Fri, 10 Oct 2008 17:58:36 +0000 (17:58 +0000)] 
Use the new CString constructor in various places to make them more readable

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1245 726aef4b-f618-498e-8847-2d620e286838

15 years agoAdd recognition for 'y' and 'n' to CUtils::GetBoolInput.
kroimon [Fri, 10 Oct 2008 15:45:20 +0000 (15:45 +0000)] 
Add recognition for 'y' and 'n' to CUtils::GetBoolInput.
Only 'yes'/'no' was possible before.
This commit also fixes a possible stack overflow because of recursion.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1244 726aef4b-f618-498e-8847-2d620e286838

15 years agoAdd some new constructors to CString
psychon [Thu, 9 Oct 2008 17:11:06 +0000 (17:11 +0000)] 
Add some new constructors to CString

One of these converts bools into "true" / "false". Isn't that really useful?

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1243 726aef4b-f618-498e-8847-2d620e286838

15 years agoperform: Clean up the style a little and make this look like the rest of znc
psychon [Wed, 8 Oct 2008 16:04:08 +0000 (16:04 +0000)] 
perform: Clean up the style a little and make this look like the rest of znc

Patch by SilverLeo, thanks. :)

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1242 726aef4b-f618-498e-8847-2d620e286838

15 years agoMark some global vars as const and static and some static local vars as const
psychon [Tue, 7 Oct 2008 13:45:34 +0000 (13:45 +0000)] 
Mark some global vars as const and static and some static local vars as const

This way the compiler puts those vars in .rodata instead of .data and everyone
happy. (Plus we have one symbol less exported)

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1241 726aef4b-f618-498e-8847-2d620e286838

15 years agoUse CSocket in webadmin instead of directly using Csock
psychon [Sat, 4 Oct 2008 20:55:50 +0000 (20:55 +0000)] 
Use CSocket in webadmin instead of directly using Csock

This gets rid of some code duplication for managing the sockets.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1240 726aef4b-f618-498e-8847-2d620e286838

15 years agoFix modperl to properly compile with perl 5.10.0
psychon [Fri, 3 Oct 2008 18:07:22 +0000 (18:07 +0000)] 
Fix modperl to properly compile with perl 5.10.0

Thanks to bigpresh and kroimon for reporting this and testing the patch.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1239 726aef4b-f618-498e-8847-2d620e286838

15 years agoFix stickychan to work with disabled channels (e.g. after a kick)
psychon [Fri, 3 Oct 2008 12:53:39 +0000 (12:53 +0000)] 
Fix stickychan to work with disabled channels (e.g. after a kick)

This kinda turns stickychan into kickrejoin... well, so what?

Thanks to Julian for reporting this.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1238 726aef4b-f618-498e-8847-2d620e286838

15 years agoFix a crash bug when modperl was loaded on some arches
psychon [Thu, 2 Oct 2008 16:26:09 +0000 (16:26 +0000)] 
Fix a crash bug when modperl was loaded on some arches

PERL_SYS_INIT3 was added to modperl in r1155-1158 to fix modperl on arches like
hppa. This added an invalid cast which caused a segfault.

If you have:
  const char *pArgv[];
Then pArgv will point to the same memory location as &pArgv. This pointer was
then casted to (char ***) which is one level of pointers too much for this
pointer.

Thanks to an anonymous reporter who pointed out the crash.
Thanks to pippijin for helping me understand the C++ magic.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1237 726aef4b-f618-498e-8847-2d620e286838

15 years agoFix cached perms when a chan is left
psychon [Thu, 2 Oct 2008 15:21:06 +0000 (15:21 +0000)] 
Fix cached perms when a chan is left

If you were kicked from a channel and rejoined, you lost all your permissions
(op, voice...), but ZNC still cached the old one you had internally. This
wasn't noticed before, because this caches is not used much.
This was found via autoop which thought it had op in a channel and so tried to
give op to others.

Call chain is like this:
Receive KICK message -> pChan->SetIsOn(false) -> pChan->Reset()
CChan::Reset() now properly clears the cache.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1236 726aef4b-f618-498e-8847-2d620e286838

15 years agoClean up modules/Makefile.in for modperl
psychon [Tue, 30 Sep 2008 18:07:25 +0000 (18:07 +0000)] 
Clean up modules/Makefile.in for modperl

The HAVE_PERL define isn't used anymore and we had some compiler flags for
modperl mentioned multiple times. Plus IMHO this looks better now ;)

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1235 726aef4b-f618-498e-8847-2d620e286838

15 years agoUse CString::Equals() everywhere.
kroimon [Tue, 30 Sep 2008 15:15:59 +0000 (15:15 +0000)] 
Use CString::Equals() everywhere.

* (CString::CaseCmp() == 0) became CString::Equals()
* (CString::CaseCmp() != 0) became !CString::Equals()
* replaced some occurrences of strn?casecmp

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1234 726aef4b-f618-498e-8847-2d620e286838

15 years agoLimit the maximal read buffer space that is used for every socket
psychon [Tue, 30 Sep 2008 14:43:51 +0000 (14:43 +0000)] 
Limit the maximal read buffer space that is used for every socket

CSocket caches the data read from a socket and then looks for lines in there.
If there is no line end, this buffer can grow quite large. This patch now
closes sockets if they get a huge read buffer.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1233 726aef4b-f618-498e-8847-2d620e286838

15 years agoAdded CString::Equals()
kroimon [Tue, 30 Sep 2008 12:58:34 +0000 (12:58 +0000)] 
Added CString::Equals()
This new function can be used to replace the old (CaseCmp() == 0) statements.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1232 726aef4b-f618-498e-8847-2d620e286838

15 years agoAdded length argument to CString::StrCmp() like in CString::CaseCmp()
kroimon [Tue, 30 Sep 2008 12:57:10 +0000 (12:57 +0000)] 
Added length argument to CString::StrCmp() like in CString::CaseCmp()

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1231 726aef4b-f618-498e-8847-2d620e286838

15 years agoAdd a Clear() function to CTable and make the base class protected
psychon [Mon, 29 Sep 2008 14:46:06 +0000 (14:46 +0000)] 
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

15 years agoRemove CSocket::m_sLabel since it isn't really used at all
psychon [Mon, 29 Sep 2008 13:34:42 +0000 (13:34 +0000)] 
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

15 years agoEnhanced the /znc command to optionally accept commands.
kroimon [Mon, 29 Sep 2008 13:33:15 +0000 (13:33 +0000)] 
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

15 years agoRemoved redundant checks for m_pUser in CClient::UserCommand()
kroimon [Sun, 28 Sep 2008 19:46:12 +0000 (19:46 +0000)] 
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

15 years agoIntroduced CString::TrimPrefix() and CString::CaseCmp() for parsing targets.
kroimon [Sun, 28 Sep 2008 19:30:20 +0000 (19:30 +0000)] 
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

15 years agoUpdate to latest Csocket
psychon [Sun, 28 Sep 2008 17:17:46 +0000 (17:17 +0000)] 
Update to latest Csocket

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1225 726aef4b-f618-498e-8847-2d620e286838

15 years agoAdded CString::TrimPrefix() and CString::TrimSuffix()
kroimon [Sun, 28 Sep 2008 16:59:28 +0000 (16:59 +0000)] 
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

15 years agoPrint warnings in CTable if you feed it with unknown columns
psychon [Sun, 28 Sep 2008 16:55:27 +0000 (16:55 +0000)] 
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

15 years agoAdd CClient::PutStatus(const CTable&) and use it everywhere
psychon [Sun, 28 Sep 2008 12:05:49 +0000 (12:05 +0000)] 
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

15 years agoFixed the CALLMOD macro in Client.cpp
kroimon [Sun, 28 Sep 2008 11:53:30 +0000 (11:53 +0000)] 
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

15 years agoRemoved thousands of redundant checks for m_pUser in CClient::ReadLine().
kroimon [Sun, 28 Sep 2008 01:03:06 +0000 (01:03 +0000)] 
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

15 years agoAnother whitespace/tab mixup fix.
kroimon [Sat, 27 Sep 2008 14:42:34 +0000 (14:42 +0000)] 
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

15 years agoRenamed UseHiddenHost to UseCloakedHost to ensure consistency.
kroimon [Sat, 27 Sep 2008 12:24:01 +0000 (12:24 +0000)] 
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

15 years agoAdded the Q module which allows the user to auth with QuakeNet's Q bot.
kroimon [Sat, 27 Sep 2008 09:52:00 +0000 (09:52 +0000)] 
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

15 years agoAdded descriptive lines to the LISTMODS and LISTAVAILMODS commands.
kroimon [Fri, 26 Sep 2008 12:52:07 +0000 (12:52 +0000)] 
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

15 years agoFixed some trailing whitespace / tab mixups and adjusted MD5.cpp to our coding guidel...
kroimon [Fri, 26 Sep 2008 12:51:36 +0000 (12:51 +0000)] 
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

15 years agoSet the client's nick name to our IRC nick when it connects to ZNC
psychon [Sun, 21 Sep 2008 12:54:10 +0000 (12:54 +0000)] 
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

15 years agoSmall optimization to starting the connect user timer
psychon [Sun, 21 Sep 2008 12:51:43 +0000 (12:51 +0000)] 
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

15 years agoFix compilation with gcc 4.3.1 is ssl is disabled
psychon [Sun, 21 Sep 2008 08:02:15 +0000 (08:02 +0000)] 
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

15 years agoIgnore messages to ourself when being disconnected from IRC.
kroimon [Sat, 20 Sep 2008 16:00:26 +0000 (16:00 +0000)] 
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

15 years agoImport the dark-clouds webadmin skin bigpresh made. Thanks :)
psychon [Fri, 19 Sep 2008 17:24:38 +0000 (17:24 +0000)] 
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

15 years agoKeepnick: Dont forward nick change errors which we generated ourselves
psychon [Thu, 18 Sep 2008 19:58:53 +0000 (19:58 +0000)] 
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

15 years agoautoconf and m4 both suck (autoconf choked on some comma and messed up badly after...
psychon [Thu, 18 Sep 2008 18:16:49 +0000 (18:16 +0000)] 
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

15 years agoRevert rev 1204
psychon [Thu, 18 Sep 2008 17:52:10 +0000 (17:52 +0000)] 
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

15 years agoAdd --disable-optimization flag to configure to remove -O2
psychon [Tue, 16 Sep 2008 13:33:19 +0000 (13:33 +0000)] 
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

15 years agoMakefile: Make all output files depend on the Makefile itself
psychon [Sun, 14 Sep 2008 17:57:15 +0000 (17:57 +0000)] 
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

15 years agoReorder some openssl library checks in configure
psychon [Sun, 14 Sep 2008 14:07:14 +0000 (14:07 +0000)] 
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

15 years agoBugfix in keepnick: PutUser() vs PutModule() screwup
psychon [Sun, 14 Sep 2008 06:05:23 +0000 (06:05 +0000)] 
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

15 years agoRenamed String.h and String.cpp to ZNCString.h and ZNCString.cpp
kroimon [Sat, 13 Sep 2008 16:38:41 +0000 (16:38 +0000)] 
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

15 years agoIncrease the version number to 0.061
psychon [Sat, 13 Sep 2008 15:46:29 +0000 (15:46 +0000)] 
Increase the version number to 0.061

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1201 726aef4b-f618-498e-8847-2d620e286838

15 years agoIncrease the version number to 0.060 znc-0.060
psychon [Sat, 13 Sep 2008 15:41:25 +0000 (15:41 +0000)] 
Increase the version number to 0.060

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1199 726aef4b-f618-498e-8847-2d620e286838

15 years agoImprove both, the code's and the debug output's easy-to-readyiness
psychon [Fri, 12 Sep 2008 15:41:12 +0000 (15:41 +0000)] 
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

15 years agoPrint a message when SIGHUP is caught
psychon [Fri, 12 Sep 2008 15:35:46 +0000 (15:35 +0000)] 
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

15 years agoSmall cleanup, removed two unused variables
psychon [Fri, 12 Sep 2008 12:55:03 +0000 (12:55 +0000)] 
Small cleanup, removed two unused variables

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1196 726aef4b-f618-498e-8847-2d620e286838

15 years agopartyline: Adjusted the hostmask for actions from rottenboy.com to znc.in to ensure...
kroimon [Wed, 10 Sep 2008 14:24:07 +0000 (14:24 +0000)] 
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

15 years agoFix '/msg *status disconnect' to *really* disconnect from IRC
psychon [Tue, 9 Sep 2008 15:54:34 +0000 (15:54 +0000)] 
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

15 years agoMake ./configure --help output look a little better
psychon [Sun, 7 Sep 2008 16:25:11 +0000 (16:25 +0000)] 
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

15 years agoAdded module 'autocycle' to replace the old core's functionality.
kroimon [Sun, 7 Sep 2008 11:50:43 +0000 (11:50 +0000)] 
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

15 years agoRemoved AutoCycle from core
kroimon [Sun, 7 Sep 2008 11:23:57 +0000 (11:23 +0000)] 
Removed AutoCycle from core

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1191 726aef4b-f618-498e-8847-2d620e286838

15 years agochansaver: Save channel keys (+k) again, core doesn't do it anymore on its own
psychon [Fri, 5 Sep 2008 19:46:43 +0000 (19:46 +0000)] 
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

15 years agoAdd new module call OnMode()
psychon [Thu, 4 Sep 2008 10:28:19 +0000 (10:28 +0000)] 
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

15 years agoI was told this is confusing, so let's clean this up (/me waves at eTeen)
psychon [Wed, 3 Sep 2008 16:24:08 +0000 (16:24 +0000)] 
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

15 years agoAdd JoinTries and MaxJoins config options to webadmin
psychon [Wed, 3 Sep 2008 14:28:18 +0000 (14:28 +0000)] 
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

15 years agoFix some channel key-related mess ups.
psychon [Tue, 2 Sep 2008 17:25:37 +0000 (17:25 +0000)] 
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

15 years agoAdd OnUserTopicRequest() for topic requests
psychon [Tue, 2 Sep 2008 12:39:18 +0000 (12:39 +0000)] 
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

15 years agoAdded myself ;)
kroimon [Sun, 31 Aug 2008 18:01:44 +0000 (18:01 +0000)] 
Added myself ;)

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1184 726aef4b-f618-498e-8847-2d620e286838

15 years agoKeep the traffic stats more up-to-date (/msg *status traffic)
psychon [Sun, 31 Aug 2008 07:21:21 +0000 (07:21 +0000)] 
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

15 years agoHandle clients in CModules the same way users are
psychon [Sat, 30 Aug 2008 19:46:28 +0000 (19:46 +0000)] 
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

15 years agoUse znc.in instead of znc.com
psychon [Sat, 30 Aug 2008 09:00:21 +0000 (09:00 +0000)] 
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

15 years agoClose listening ports if we have too many open fds
psychon [Sat, 30 Aug 2008 08:35:11 +0000 (08:35 +0000)] 
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

15 years agoUpdate to latest Csocket
psychon [Fri, 29 Aug 2008 18:59:05 +0000 (18:59 +0000)] 
Update to latest Csocket

SockError() is now called with the correct errno if accept() fails.
This is some preparation for a later patch which will handle EMFILE.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1179 726aef4b-f618-498e-8847-2d620e286838

15 years agoInstead of (ab)using a CClient for listening, use an own class this job
psychon [Fri, 29 Aug 2008 18:51:08 +0000 (18:51 +0000)] 
Instead of (ab)using a CClient for listening, use an own class this job

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1178 726aef4b-f618-498e-8847-2d620e286838

15 years agoAdd a config option 'MaxJoins' to limit the number of joins ZNC does at once
psychon [Fri, 29 Aug 2008 15:06:08 +0000 (15:06 +0000)] 
Add a config option 'MaxJoins' to limit the number of joins ZNC does at once

This should hopefully fix a couple of 'Excess flood' problems we were having.

Thanks to SilverLeo for finally writing this :P

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1177 726aef4b-f618-498e-8847-2d620e286838

15 years agoWriteToDisk() didn't make sure the file was empty when its map was empty
psychon [Thu, 28 Aug 2008 18:50:42 +0000 (18:50 +0000)] 
WriteToDisk() didn't make sure the file was empty when its map was empty

This bug was introduced by SilverLeo who also found and fixed it. :P

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1176 726aef4b-f618-498e-8847-2d620e286838