]> jfr.im git - irc/rizon/znc.git/log
irc/rizon/znc.git
13 years agoIncrease the version number to 0.094 znc-0.094
psychon [Fri, 20 Aug 2010 14:12:15 +0000 (14:12 +0000)] 
Increase the version number to 0.094

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

13 years agoBeware of flying spaghetti monsters, they bite.
psychon [Wed, 18 Aug 2010 07:59:55 +0000 (07:59 +0000)] 
Beware of flying spaghetti monsters, they bite.

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

13 years agoFix a NULL pointer dereference in route_replies
psychon [Wed, 18 Aug 2010 07:57:23 +0000 (07:57 +0000)] 
Fix a NULL pointer dereference in route_replies

When there was only one client with a pending request and that client
disconnected from ZNC, we didn't destroy the timeout. This means that the
associated timer eventually fired and then tried to display which request caused
the timeout. But since we already cleaned up the rest, this resulted in a NULL
pointer dereference.

This commit fixes also another bug: If two different clients got pending
requests and the client whose request was currently handled disconnected, we
didn't send the other client's request to the IRCd.

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

13 years agoFix make output
psychon [Mon, 9 Aug 2010 13:17:08 +0000 (13:17 +0000)] 
Fix make output

The output must not use $< since for out-of-tree builds this contains the
relative paths to the file in question. Since $@ will always be in the current
directory, we should use that one instead.

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

13 years agoReduce number of module hooks
psychon [Thu, 5 Aug 2010 12:13:44 +0000 (12:13 +0000)] 
Reduce number of module hooks

The new hooks OnServerCapAccepted() and OnServerCapRejected() are replaced by
OnServerCapResult(). This should force people who want to use this to handle
possible failures in requesting the capability.

Again, thanks to DarthGandalf for the patch.

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

13 years agoServer part of CAP stuff
psychon [Wed, 4 Aug 2010 18:50:44 +0000 (18:50 +0000)] 
Server part of CAP stuff

This introduces the code for modules to request CAPs on the IRC server. They
will get a callback when the capability was accepted or rejected.

Thanks to DarthGandalf for this patch. This should turn DarthGandalf and tomaw
into happy znc users again. ;)

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

13 years agoCall client module hooks for built-in-core capabilities
psychon [Tue, 3 Aug 2010 17:25:59 +0000 (17:25 +0000)] 
Call client module hooks for built-in-core capabilities

Patch (and commit message) by DarthGandalf, thanks.

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

13 years agoAdd support for CAP CLEAR from clients
psychon [Tue, 3 Aug 2010 17:23:37 +0000 (17:23 +0000)] 
Add support for CAP CLEAR from clients

Thanks to DarthGandalf for the patch.

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

13 years agoUpdate to latest Csocket
psychon [Tue, 3 Aug 2010 11:37:52 +0000 (11:37 +0000)] 
Update to latest Csocket

This fixes a busy-loop bug with openssl and adds support for using poll()
instead of select().

Currently, poll() isn't used unless you use
./configure CXXFLAGS="-DCSOCK_USE_POLL".

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

13 years agoFix some more unsafe substr() calls
psychon [Tue, 3 Aug 2010 10:49:03 +0000 (10:49 +0000)] 
Fix some more unsafe substr() calls

All of these require at least a valid login to znc to cause a std::out_of_range
exceptions, some might not even be exploitable!

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

13 years agoMake make's output more readable
psychon [Tue, 3 Aug 2010 10:01:36 +0000 (10:01 +0000)] 
Make make's output more readable

The real command line is now hidden and instead a short message which explains
what is done is displayed. To get back the old behavior, use "make VERBOSE=1".

Thanks to DarthGandalf for this.

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

13 years agoFix an out-of-range access to std::string
psychon [Tue, 3 Aug 2010 09:50:32 +0000 (09:50 +0000)] 
Fix an out-of-range access to std::string

When we received a "PING" from a client without an argument, std::string would
throw a std::out_of_range exception which killed znc.

Thanks to Sm0ke0ut for reporting this.

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

13 years agoAttach to channels when joining them
psychon [Sat, 24 Jul 2010 20:34:26 +0000 (20:34 +0000)] 
Attach to channels when joining them

Here's the scenario:
- Client joins #chan, then detaches from #chan (/detach #chan).
- $EVIL_OP kicks us from #chan. Since it's detached, this is not forwarded.
- Client reattaches to #chan (sends us a join for #chan).

What happens is that the client does *not* receive a successful JOIN for the
channel, but TOPIC, MODE and the NAMES reply is forwarded. On proper clients
this would result in weird traffic shown in the server window. On broken clients
like irssi which don't wait for the JOIN reply from the server, this meant that
it looked like a successful JOIN to the client while ZNC still thought the
channel was detached.

This is fixed by automatically attaching to the channel when we join it due to a
client. This means that the channel will always be attached after a JOIN.

Thanks to tomaw for finding this and making me actually understand that this is
a bug in ZNC, not irssi.

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

13 years agoMade fakeonline behave properly when ZNC is not connected to any IRC server. Reported...
cflakes [Wed, 21 Jul 2010 17:53:07 +0000 (17:53 +0000)] 
Made fakeonline behave properly when ZNC is not connected to any IRC server. Reported by devilspgd's imaginary girl friend. Patch by MEEEEE!!

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

13 years agoFix a help message
psychon [Tue, 20 Jul 2010 17:31:17 +0000 (17:31 +0000)] 
Fix a help message

Patch by DarthGandalf, thanks.

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

13 years agoRaised the number of PM lines in the PM buffer to 250 (from 100)
cflakes [Sat, 17 Jul 2010 15:02:16 +0000 (15:02 +0000)] 
Raised the number of PM lines in the PM buffer to 250 (from 100)

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

13 years agoRename SslPemFile to SSLCertFile
psychon [Fri, 16 Jul 2010 21:11:10 +0000 (21:11 +0000)] 
Rename SslPemFile to SSLCertFile

This is *NOT* backward compatible with the old name for that config option. If
you updated to the latest nightly in the last two days, well, you'll have to
fix your config by hand. Sorry.

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

13 years agoFix a std::out_of_range error in partyline
psychon [Fri, 16 Jul 2010 21:01:50 +0000 (21:01 +0000)] 
Fix a std::out_of_range error in partyline

If the CHANTYPES token was the last one in a 005 numeric, partyline would call
std::insert() with CString::npos for the position to insert at. This throws a
std::out_of_range error. Fix this by using CString::append() in this case.

Thanks to Superfly_ for the bug report and helping me reproduce this.

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

13 years agoAdd a new config option SslPemFile
psychon [Wed, 14 Jul 2010 18:51:12 +0000 (18:51 +0000)] 
Add a new config option SslPemFile

This option defines an alternate part for <datadir>/znc.pem.

Thanks to evaryont for the idea and the patch.

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

13 years agoDarthGandalf does not approve
psychon [Sat, 10 Jul 2010 17:09:51 +0000 (17:09 +0000)] 
DarthGandalf does not approve

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

13 years ago$COMMIT_MSG
psychon [Sat, 10 Jul 2010 08:11:55 +0000 (08:11 +0000)] 
$COMMIT_MSG

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

13 years agoComplain about truncated config files
psychon [Sat, 10 Jul 2010 08:02:32 +0000 (08:02 +0000)] 
Complain about truncated config files

If we were in an user section when we reached the end of the config file, that
user was previously discarded. This makes reading the config file instead.

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

13 years agoWhoops, this should have been part of the last commit
psychon [Sat, 10 Jul 2010 07:52:30 +0000 (07:52 +0000)] 
Whoops, this should have been part of the last commit

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

13 years agoMark some functions as const
psychon [Sat, 10 Jul 2010 07:51:35 +0000 (07:51 +0000)] 
Mark some functions as const

Thanks to vBm for running cppcheck against znc and sharing the results.
This should fix all the "foo can be const" messages.

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

13 years agoPrint the prefix at the end of configure
psychon [Sat, 10 Jul 2010 07:15:21 +0000 (07:15 +0000)] 
Print the prefix at the end of configure

This should help people who have to compile ZNC twice because they used the
wrong prefix the first time. ;)

Idea for this and the last commit are (c) SHiZNO (well, they were his ideas).

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

13 years agoAdd a short help text to the end of make
psychon [Sat, 10 Jul 2010 07:10:16 +0000 (07:10 +0000)] 
Add a short help text to the end of make

Thanks to various people for helping with this.
Most notably DarthGandalf (again).

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

13 years agoProperly show if we are connecting to a ssl server
psychon [Sat, 10 Jul 2010 06:53:10 +0000 (06:53 +0000)] 
Properly show if we are connecting to a ssl server

Idea by DarthGandalf, crappy commit message by me.

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

13 years agoRemove the CClient* argument to all module calls
psychon [Fri, 9 Jul 2010 18:02:04 +0000 (18:02 +0000)] 
Remove the CClient* argument to all module calls

OnUnknownUserRaw() and OnClientCapRequest() were both getting a CClient* as
their first argument, but the proper way to pass a CClient* argument to a module
is via GetClient(). Since recently, all the places where this module hooks are
called do this properly, so we can remove this bogus argument.

No module that is part of znc is affected by this change.
Let's see how many external ones break. ;)

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

13 years agoDo all module calls through the macros
psychon [Thu, 8 Jul 2010 16:43:23 +0000 (16:43 +0000)] 
Do all module calls through the macros

This commit should make sure that all module calls are done through either
MODULECALL, GLOBALMODULECALL or ALLMODULECALL. Also, in the process some module
calls where ("accidentally" ;) ) fixed to set correct values for a global
module's m_pUser during a module call.

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

13 years agoAdd new macro ALLMODULECALL()
psychon [Thu, 8 Jul 2010 16:38:18 +0000 (16:38 +0000)] 
Add new macro ALLMODULECALL()

This macro does a module call on all global and all user modules on all users.
This is useful for e.g. OnBoot().

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

13 years agoAdd new macro GLOBALMODULECALL()
psychon [Thu, 8 Jul 2010 16:05:40 +0000 (16:05 +0000)] 
Add new macro GLOBALMODULECALL()

MODULECALL() calls global and user modules, GLOBALMODULECALL() only calls global
modules. The macro arguments are the same, but GLOBALMODULECALL() can live with
a user being NULL while MODULECALL() detests being called like that.

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

13 years agoMinor fix for doxygen
psychon [Thu, 8 Jul 2010 15:43:04 +0000 (15:43 +0000)] 
Minor fix for doxygen

Patch by DarthGandalf, thanks.

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

13 years agoFix a comment which was broken since r2037
psychon [Wed, 7 Jul 2010 20:43:54 +0000 (20:43 +0000)] 
Fix a comment which was broken since r2037

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

13 years agoAdd module calls for client CAPs
psychon [Wed, 7 Jul 2010 16:01:15 +0000 (16:01 +0000)] 
Add module calls for client CAPs

This commit adds new module calls which make it possibly to announce new
capabilities from a module.

Thanks to DarthGandalf for the patch and for not going mad from my comments. :)

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

13 years agoSuppress a CAP error on servers that dont support it.
silverleo [Tue, 6 Jul 2010 15:38:21 +0000 (15:38 +0000)] 
Suppress a CAP error on servers that dont support it.

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

13 years agoRemove a bogus AC_MSG_RESULT
psychon [Mon, 5 Jul 2010 17:23:19 +0000 (17:23 +0000)] 
Remove a bogus AC_MSG_RESULT

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

13 years agoRename install.sh to install-sh and 'improve' it
psychon [Mon, 5 Jul 2010 17:11:23 +0000 (17:11 +0000)] 
Rename install.sh to install-sh and 'improve' it

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

13 years agoUse AC_PROG_INSTALL to find a usable install
psychon [Mon, 5 Jul 2010 16:35:48 +0000 (16:35 +0000)] 
Use AC_PROG_INSTALL to find a usable install

Thanks to LeftWing aka Joshua M. Clulow. This patch is based on his work.

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

13 years agoAdd Joshua M. Clulow to AUTHORS
psychon [Mon, 5 Jul 2010 16:14:45 +0000 (16:14 +0000)] 
Add Joshua M. Clulow to AUTHORS

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

13 years agoUse fcntl() instead of flock() for locking the config file
psychon [Mon, 5 Jul 2010 16:13:23 +0000 (16:13 +0000)] 
Use fcntl() instead of flock() for locking the config file

fcntl() is more portable than flock() so this makes znc run on more systems
(everyone smile and say hi to solaris). The downside is that fcntl() locks are
lost if *any* fd referring to that file is closed (luckily we don't do that).

The big downside is that the child process after fork() does not inherit the
lock. To work around this, when znc forks into the background, the child process
immediately blocks and tries to get the lock on the config file. Once the parent
releases the lock by exiting, the child will get it.

This shouldn't cause races with other ZNCs, because in every other place we
don't block waiting for a lock but instead abort immediately if the file is
already locked.

Thanks to LeftWing aka Joshua M. Clulow for making znc work on solaris (and
automatically fixing some issues with NFS in the process).

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

13 years agoSet $SHELL in Makefiles
psychon [Mon, 5 Jul 2010 15:54:03 +0000 (15:54 +0000)] 
Set $SHELL in Makefiles

$SHELL controls which shell is used for executing the commands in a Makefile.
Since modules/Makefile does not work with ksh, we need to find a "proper" shell.
Luckily, configure already did that job and announces its findings via @SHELL@.

This should make our Makefile work on Solaris.
Thanks to LeftWing aka Joshua M. Clulow.

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

13 years agoMade the antiidle module use HALT instead of HALTCORE so the weird messages never...
cflakes [Sun, 4 Jul 2010 18:30:39 +0000 (18:30 +0000)] 
Made the antiidle module use HALT instead of HALTCORE so the weird messages never make it to other modules, e.g. colloquy (provided they have been loaded in the right order).

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

13 years agoMade <th> usuable in all skins. The new policy is to use <thead>(<td>...</td>)+<...
cflakes [Sun, 4 Jul 2010 17:44:03 +0000 (17:44 +0000)] 
Made <th> usuable in all skins. The new policy is to use <thead>(<td>...</td>)+</thead> for horizontal headers and <th> for vertical ones.

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

13 years agoWebMods: Converted some CRLFs to LFs, changed <td> into <th> in webadmin's traffic...
cflakes [Sun, 4 Jul 2010 17:18:59 +0000 (17:18 +0000)] 
WebMods: Converted some CRLFs to LFs, changed <td> into <th> in webadmin's traffic.tmpl. "Patches" by zynox, thanks.

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

13 years agoIncrease the version number to 0.093
psychon [Sat, 3 Jul 2010 09:39:39 +0000 (09:39 +0000)] 
Increase the version number to 0.093

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

13 years agoMake --with-openssl do more
psychon [Sat, 3 Jul 2010 07:56:04 +0000 (07:56 +0000)] 
Make --with-openssl do more

It now also adds lib64 to the library search path. On 32-bit systems this won't
hurt because such a directory most likely does not exist.

Also, because we are trying to find pkg-config via openssl first, the
appropriate dirs are also added to $PKG_CONFIG_PATH.

Thanks to DarthGandalf for some good suggestions on this one.

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

13 years agoCheck for c-ares 1.5.0 or later in configure
psychon [Sat, 3 Jul 2010 07:52:46 +0000 (07:52 +0000)] 
Check for c-ares 1.5.0 or later in configure

There was an API change to the callback type of ares_gethostbyname() in 1.5.0,
so znc won't compile with anything older than that.

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

13 years agoAdd aclocal.m4 and regenerate configure
psychon [Sat, 3 Jul 2010 07:50:22 +0000 (07:50 +0000)] 
Add aclocal.m4 and regenerate configure

The always-changing versions of the pkg-config m4 macros are mildly annoying.
To work around this, we now have a file aclocal.m4 (generated by aclocal) that
contains all the needed external macros. If you just call "autoconf", it will
use the macros from that file. "autoreconf" will call "aclocal" and "autoconf"
so that both files are up-to-date.

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

13 years agoUpdate to latest Csocket
psychon [Fri, 2 Jul 2010 20:03:41 +0000 (20:03 +0000)] 
Update to latest Csocket

This fixes a bug where the wrong errno value was used for SockError(). This also
fixes a busy loop caused by broken c-ares timeout handling on our side.

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

13 years agoCorrectly handle CAP REQ
psychon [Wed, 30 Jun 2010 17:39:39 +0000 (17:39 +0000)] 
Correctly handle CAP REQ

The old code only looked at the first capability request.

Found and patched by DarthGandalf, thanks.

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

13 years agoRemove OnUser{Attached,Detached}
psychon [Tue, 29 Jun 2010 19:07:04 +0000 (19:07 +0000)] 
Remove OnUser{Attached,Detached}

These are unused functions that are only used for generating warning messages
due to -Woverloaded-virtual. These were introduced in 2008. I think nothing
needs this any more, so let's just remove these for good. Bye, bye.

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

13 years agoRemove CZNC::GetUser()
psychon [Tue, 29 Jun 2010 18:58:14 +0000 (18:58 +0000)] 
Remove CZNC::GetUser()

CZNC::FindUser() does the same thing and we don't need two of these. GetUser()
was removed because FindUser() is used more than GetUser().

Thanks to Sthebig for noticing this.

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

13 years agoChanged some text strings in --makeconf, idea & first patch by DGandalf, thanks
cflakes [Sun, 27 Jun 2010 01:15:14 +0000 (01:15 +0000)] 
Changed some text strings in --makeconf, idea & first patch by DGandalf, thanks

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

13 years agoAdd a new -nostore flag to the away module so you can use its timed away functionalit...
cflakes [Sun, 27 Jun 2010 01:04:55 +0000 (01:04 +0000)] 
Add a new -nostore flag to the away module so you can use its timed away functionality without its message storing capabilities.

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

13 years agoRethink PING/PONG handling
psychon [Fri, 25 Jun 2010 15:51:16 +0000 (15:51 +0000)] 
Rethink PING/PONG handling

All PINGs are replied by ZNC, only PINGs from the client are forwarded.
All PONGs are blocked.

This should solve all issues with annoying PONGs showing up in clients.

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

13 years agoPatch by DarthGandalf, thanks.
psychon [Thu, 24 Jun 2010 19:42:51 +0000 (19:42 +0000)] 
Patch by DarthGandalf, thanks.

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

13 years agoCorrectly handle large CAP lists from the IRCd
psychon [Tue, 22 Jun 2010 16:14:31 +0000 (16:14 +0000)] 
Correctly handle large CAP lists from the IRCd

As DarthGandalf noticed, the spec asks for an "*" to be prepended if the reply
needs to be split up into multiple lines. It doesn't really matter for the
current code, but let's make this future-proof. :)

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

13 years agoRemove CHTTPSock::GetErrorPage()
psychon [Tue, 22 Jun 2010 15:26:17 +0000 (15:26 +0000)] 
Remove CHTTPSock::GetErrorPage()

There is no valid reason to use GetErrorPage() instead of PrintErrorPage() which
can be seen from the fact that all the existing callers are *wrong*. So, to
avoid this mistake in the future, inline GetErrorPage() into its only valid
caller (PrintErrorPage()).

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

13 years agoWebMods: Use PrintErrorPage() instead of GetErrorPage()
psychon [Tue, 22 Jun 2010 15:18:56 +0000 (15:18 +0000)] 
WebMods: Use PrintErrorPage() instead of GetErrorPage()

GetErrorPage() only generates the HTML for the error page while PrintErrorPage()
actually makes sure the error page is sent with the correct HTTP status code.
(We sent all error pages with status "200 OK"!)

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

13 years agoChanged OnKick module call to be useful.
cflakes [Tue, 22 Jun 2010 15:00:50 +0000 (15:00 +0000)] 
Changed OnKick module call to be useful.

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

13 years agoDon't accept extra arguments to znc as a config file name
psychon [Tue, 22 Jun 2010 14:35:10 +0000 (14:35 +0000)] 
Don't accept extra arguments to znc as a config file name

It's much wiser to specify a whole --datadir because two znc instances running
on the same datadir but different configs just calls for problems.

Patch by DarthGandalf, some messing by me, idea by various.

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

13 years agoRevert unintended change from revision 2029 and added a comment so it won't happen...
cflakes [Mon, 21 Jun 2010 12:51:37 +0000 (12:51 +0000)] 
Revert unintended change from revision 2029 and added a comment so it won't happen again.

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

13 years agoroute_replies: Handle channel lists
psychon [Sun, 20 Jun 2010 15:47:07 +0000 (15:47 +0000)] 
route_replies: Handle channel lists

This adds support for querying the channel ban, exempt and invex lists to
route_replies. It doesn't differentiate between the replies since there should
only ever be one of these requests in-flight.

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

13 years agoMinor optimization
psychon [Sun, 20 Jun 2010 10:32:29 +0000 (10:32 +0000)] 
Minor optimization

Convert a while-loop into a for-loop in route_replies.

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

13 years agoYay for pink invisible unicorns! yay!
cflakes [Sat, 19 Jun 2010 20:03:13 +0000 (20:03 +0000)] 
Yay for pink invisible unicorns! yay!

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

13 years agoRemoved a huge comment of unused code from Utils.cpp
cflakes [Sat, 19 Jun 2010 19:37:05 +0000 (19:37 +0000)] 
Removed a huge comment of unused code from Utils.cpp

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

13 years agoMade CTable not crash if someone failed at coding at tries to
cflakes [Sat, 19 Jun 2010 19:31:42 +0000 (19:31 +0000)] 
Made CTable not crash if someone failed at coding at tries to
assign a value to a non-existant column. Found and first patch by BrianC, thanks.

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

13 years agoFixed an issue identified by Un1matr1x: If you were running two 0.090 ZNCs on the...
cflakes [Sat, 19 Jun 2010 19:07:24 +0000 (19:07 +0000)] 
Fixed an issue identified by Un1matr1x: If you were running two 0.090 ZNCs on the same IP,
(but different ports), any web login session from ZNC #1 would overwrite the session from
ZNC #2. While doing this, also removed an unnecessary check in CHTTPSock::SendCookie and
CHTTPSock::GetRequestCookies (which doesn't transparently translate cookie names and has
never been used so far).

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

13 years agoAdd certauth module
psychon [Wed, 16 Jun 2010 19:56:07 +0000 (19:56 +0000)] 
Add certauth module

This module let's one authenticate via an SSL certificate to znc, just like
oftc's certfp.

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

13 years agoMicro optimization
psychon [Wed, 16 Jun 2010 19:11:07 +0000 (19:11 +0000)] 
Micro optimization

Only call GetUser() when we actually need the result

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

13 years agoSupport disabling CAPabilities
psychon [Wed, 16 Jun 2010 18:48:30 +0000 (18:48 +0000)] 
Support disabling CAPabilities

This commits adds support for cap commands like this one:
CAP REQ :-multi-prefix

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

13 years agoFix a NULL pointer dereference with traffic stats
psychon [Sun, 13 Jun 2010 17:14:52 +0000 (17:14 +0000)] 
Fix a NULL pointer dereference with traffic stats

When something requested traffic statistics while there was an unauthenticated
connection to ZNC, there was a NULL pointer dereference. Fix this by making the
code saner and removing all NULL pointer dereferences. ;)

Thanks to various people who reported this. A special thank you goes to Woet who
helped debugging this.

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

13 years agoWrite MaxBufferSize to the config
psychon [Sun, 13 Jun 2010 07:58:28 +0000 (07:58 +0000)] 
Write MaxBufferSize to the config

r2020 added a new config option but forgot to actually write that setting back
to the config. Whoops!

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

13 years agoAdd support for some capabilities
psychon [Sun, 13 Jun 2010 07:46:57 +0000 (07:46 +0000)] 
Add support for some capabilities

multi-prefix is just NAMESX' CAP name and userhost-in-names is just UHNAMES for
CAP. This makes it pretty easy to make them work. :)

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

13 years agoRevert r2016
psychon [Sun, 13 Jun 2010 07:37:47 +0000 (07:37 +0000)] 
Revert r2016

That revision added CAP support to fixfreenode, blocking the identify-msg
capability. This is no longer necessary thanks to the previous commit.

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

13 years agoImplement CAP between clients and znc
psychon [Sun, 13 Jun 2010 07:36:32 +0000 (07:36 +0000)] 
Implement CAP between clients and znc

Right now, znc doesn't support any capabilities, but the general protocol works.
This also has the plus point that it stops direct CAP commands between the IRCd
and clients. That's a good thing because different clients might not support the
same CAPs and thus znc would have to translate between them.

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

13 years agoMove some common code into CClient::AuthUser()
psychon [Sun, 13 Jun 2010 07:15:35 +0000 (07:15 +0000)] 
Move some common code into CClient::AuthUser()

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

13 years agoAdd new global setting MaxBufferSize
psychon [Sat, 12 Jun 2010 20:20:33 +0000 (20:20 +0000)] 
Add new global setting MaxBufferSize

Previously, /znc setbuffer had a hardcoded limit of 500, other ways of setting
the buffer size didn't have any limit built-in.

This patch makes that limit configurable and makes sure the various places
honour it.

Thanks to DarthGandalf for the idea with the bForce argument, I were too
small-minded to come up with it myself. :(

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

13 years agoGetAnonConnectionCount(): Bugfix
psychon [Tue, 8 Jun 2010 19:09:47 +0000 (19:09 +0000)] 
GetAnonConnectionCount(): Bugfix

The function counted almost all sockets, but it's only supposed to count inbound
ones which aren't identified client sockets. Do this by adding a check for
"socket is really inbound" in there.

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

13 years agoTry to use pkg-config for finding openssl
psychon [Mon, 7 Jun 2010 19:34:20 +0000 (19:34 +0000)] 
Try to use pkg-config for finding openssl

If using pkg-config fails, we fall back to the old method with AC_CHECK_LIB().

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

14 years agoconfigure: Really automatically disable perl if it's not found
psychon [Mon, 7 Jun 2010 19:05:51 +0000 (19:05 +0000)] 
configure: Really automatically disable perl if it's not found

Since r1895 configure tries to disable perl if it doesn't find the perl binary
or libperl, but there was a bug. If the perl binary existed but libperl wasn't
found, it pretended to disable modperl but didn't really. Whoops.

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

14 years agoUpdate fixfreenode
psychon [Mon, 7 Jun 2010 12:41:56 +0000 (12:41 +0000)] 
Update fixfreenode

freenode now also allows using CAP to request the identify-msg capability.
Plus point is that one can also disable it via this interface
(CAP REQ :-identify-msg), but we still don't want any client
to enable it at all.

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

14 years agoWhoops (wtf was webadmin doing with fake modules?)
psychon [Mon, 7 Jun 2010 12:39:16 +0000 (12:39 +0000)] 
Whoops (wtf was webadmin doing with fake modules?)

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

14 years agoRemove some unneeded functions from CWebSock
psychon [Mon, 7 Jun 2010 12:38:24 +0000 (12:38 +0000)] 
Remove some unneeded functions from CWebSock

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

14 years agoRemove fake modules
psychon [Mon, 7 Jun 2010 12:35:00 +0000 (12:35 +0000)] 
Remove fake modules

They aren't needed anymore and most likely won't be needed any time soon.

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

14 years agoAdd a ":" to the argument list of our CAP REQ
psychon [Mon, 7 Jun 2010 11:40:34 +0000 (11:40 +0000)] 
Add a ":" to the argument list of our CAP REQ

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

14 years agoRemoved the mis-use of the fake module concept in WebMods.
cflakes [Sun, 6 Jun 2010 11:41:31 +0000 (11:41 +0000)] 
Removed the mis-use of the fake module concept in WebMods.

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

14 years agoAllow leading/trailing spaces in the config
psychon [Sun, 6 Jun 2010 09:47:30 +0000 (09:47 +0000)] 
Allow leading/trailing spaces in the config

This is especially useful for all those ASCII-art-in-the-MOTD guys.

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

14 years agoIncrease the version number to 0.091
psychon [Sun, 6 Jun 2010 07:26:05 +0000 (07:26 +0000)] 
Increase the version number to 0.091

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

14 years agoIncrease the version number to 0.090
psychon [Sun, 6 Jun 2010 07:23:52 +0000 (07:23 +0000)] 
Increase the version number to 0.090

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

14 years agoFixed a source code comment. Patch by DGandalf. Thanks!
cflakes [Sat, 29 May 2010 20:11:48 +0000 (20:11 +0000)] 
Fixed a source code comment. Patch by DGandalf. Thanks!

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

14 years agoFixed display error with tables that extend further than they are supposed to due...
cflakes [Sat, 29 May 2010 19:44:25 +0000 (19:44 +0000)] 
Fixed display error with tables that extend further than they are supposed to due to long unbreakable contents.

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

14 years agoRemoved unnecessary argument from admin.cpp. LoadModule(..., bFake = false) is the...
cflakes [Sat, 22 May 2010 10:34:11 +0000 (10:34 +0000)] 
Removed unnecessary argument from admin.cpp. LoadModule(..., bFake = false) is the default.

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

14 years agoFixed web mod traffic being counted twice. Issue identified by psychon.
cflakes [Sat, 22 May 2010 10:32:59 +0000 (10:32 +0000)] 
Fixed web mod traffic being counted twice. Issue identified by psychon.

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

14 years agoRemove useless help page on webskins
psychon [Fri, 21 May 2010 16:30:54 +0000 (16:30 +0000)] 
Remove useless help page on webskins

Didn't do anything and certainly wasn't helpful at all.

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

14 years agoPrint a warning if --enable-run-from-source is missing
psychon [Thu, 20 May 2010 20:24:30 +0000 (20:24 +0000)] 
Print a warning if --enable-run-from-source is missing

If znc was compiled with "--disable-run-from-source" it will check if a file
called "znc-uninstalled.pc" exists in the directory the znc binary is in. If
there is such a file, it will print a warning that "--enable-run-from-source" is
most likely missing.

Idea partly by SilverLeo, thanks.

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

14 years agomodules/Makefile: Don't try to install www/
psychon [Tue, 18 May 2010 16:16:04 +0000 (16:16 +0000)] 
modules/Makefile: Don't try to install www/

That directory was removed in r1997 so trying to install it might be rather
tricky (in fact, it failed and caused 'make install' to abort).

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

14 years agoAdd DarthGandalf to AUTHORS
psychon [Tue, 18 May 2010 16:14:23 +0000 (16:14 +0000)] 
Add DarthGandalf to AUTHORS

He's been a great help for some time already and has contributed
lots of patches and ideas.

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

14 years agoautoop: Don't abort ongoing exchange on new joins
psychon [Mon, 17 May 2010 13:31:17 +0000 (13:31 +0000)] 
autoop: Don't abort ongoing exchange on new joins

When one joined to a channel after someone else's autoop already sent a
challenge, the other autoop will forget it sent a challange and happily generate
a new one. This might cause bogous "incorrect password" messages.

Patch by DarthGandalf, bug found by SilverLeo (I think...).

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

14 years agoMove module's templates to their data dir
psychon [Mon, 17 May 2010 13:25:17 +0000 (13:25 +0000)] 
Move module's templates to their data dir

Instead of having the template files and images in /usr/share/znc/www/<mod>/,
modules now get to use /usr/share/znc/<mod>/tmpl/ and files/ for this purpose.
This puts those directories for static data to good use again and might even fix
some bugs (after all, the code for that dir is older and more tested than the
new code for www/).

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