]> jfr.im git - irc/znc/znc.git/log
irc/znc/znc.git
13 years agoIncrease the version number to 0.096 znc-0.096
psychon [Sat, 6 Nov 2010 14:55:25 +0000 (14:55 +0000)] 
Increase the version number to 0.096

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

13 years agoFix bug in UI that was introduced in r1794.
darthgandalf [Tue, 26 Oct 2010 16:20:57 +0000 (16:20 +0000)] 
Fix bug in UI that was introduced in r1794.

ZNC shouldn't tell people to use unexistant options to ./configure

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

13 years agoCsocket: Fix a bug with poll() and CExecSock
psychon [Sun, 24 Oct 2010 09:04:17 +0000 (09:04 +0000)] 
Csocket: Fix a bug with poll() and CExecSock

select() says a socket is readable when the other end hangs up, with poll() you
only get POLLHUP. These other flags should all be handled like POLLIN.

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

13 years agolastseen module: replaced some obnoxious code :P
cflakes [Sat, 23 Oct 2010 11:50:57 +0000 (11:50 +0000)] 
lastseen module: replaced some obnoxious code :P

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

13 years agolastseen module: minor code improvements: moved strftime business into a separate...
cflakes [Sat, 23 Oct 2010 11:46:15 +0000 (11:46 +0000)] 
lastseen module: minor code improvements: moved strftime business into a separate method.

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

13 years agopartyline: Only inject prefixes if we know the prefixes
psychon [Thu, 21 Oct 2010 17:27:19 +0000 (17:27 +0000)] 
partyline: Only inject prefixes if we know the prefixes

There are apparently "IRC" daemons (which don't deserve that name) that don't
send any 005. Yes, I'm looking at you, chat.wikileaks.org. For these servers we
shouldn't inject partyline's channel prefix because that makes us send out a
"CHANTYPES=~" line which severely confuses clients. XChat then turns everything
into a query!

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

13 years agoRevert r2159
psychon [Thu, 21 Oct 2010 16:12:03 +0000 (16:12 +0000)] 
Revert r2159

Turns out that OpenBSD does define IPV6_V6ONLY, but setting that option fails.
So this commit was no good after all. :(

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

13 years agoFix modperl timers API.
darthgandalf [Sun, 17 Oct 2010 09:27:15 +0000 (09:27 +0000)] 
Fix modperl timers API.
It was pretty difficult to pass arbitrary argument. Needed to generate
new sub each time etc.
Now CreateTimer gets new named parameter: context. Its value will be
passed to given sub as named parameter context.
Also as it was hard to use variant of CreateTimer without named params
(there's no parameter 'context' there), that variant is gone.

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

13 years agoAdd a warning if IPV6_V6ONLY is not defined
psychon [Sun, 17 Oct 2010 08:42:07 +0000 (08:42 +0000)] 
Add a warning if IPV6_V6ONLY is not defined

Each time we hit a "Listener" config option and the current system doesn't have
IPV6_V6ONLY, we print a warning that "Listener4" and "Listener6" should be used
instead. The current "Listener" will then be interpreted as an IPV4 port.

--makeconf is changed so that it doesn't write out "Listener" lines when
IPV6_V6ONLY is not defined so that we don't trigger the warning like this.

The only "real OS" (windows doesn't count here) that is known to not have
IPV6_V6ONLY is OpenBSD.

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

13 years agoZNCString.h: Remove some useless typedefs
psychon [Mon, 11 Oct 2010 14:45:17 +0000 (14:45 +0000)] 
ZNCString.h: Remove some useless typedefs

They weren't even used anywhere!

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

13 years agoDocument most of CString and MCString
psychon [Mon, 11 Oct 2010 14:24:36 +0000 (14:24 +0000)] 
Document most of CString and MCString

There are only some "minor" functions that are still undocumented now.

This also sneaks in an API change: A useless file mode argument to
MCString::ReadFromDisk() is gone. Opening a file doesn't ask for a file mode.

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

13 years agoRemove sockets and timers from perl modules in their destructors.
darthgandalf [Sun, 10 Oct 2010 09:59:15 +0000 (09:59 +0000)] 
Remove sockets and timers from perl modules in their destructors.
This should decrease memory usage a bit, and decrease chance of crashing znc from bad perl module a bit.

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

13 years agochansaver: Ignore channel key "*"
psychon [Sat, 2 Oct 2010 12:39:20 +0000 (12:39 +0000)] 
chansaver: Ignore channel key "*"

There are some nets out there which display the current channel key as "*" if
you are already in the channel. This means ZNC would remember the channel key as
"*" and thus be unable to rejoin the channel. Bad.

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

13 years agoCString API docs: Fix
psychon [Thu, 30 Sep 2010 08:08:54 +0000 (08:08 +0000)] 
CString API docs: Fix

Whenever I fail, SilverLeo comes by and says "you failed again". :(

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

13 years agoUse poll() instead of select() by default
psychon [Wed, 29 Sep 2010 16:53:07 +0000 (16:53 +0000)] 
Use poll() instead of select() by default

ZNC now uses poll() unless it is disabled by ./configure --disable-poll. This
should get rid of the limit to FD_SETSIZE sockets (~1024).

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

13 years agoAdd some more API docs to CString
psychon [Tue, 28 Sep 2010 11:42:20 +0000 (11:42 +0000)] 
Add some more API docs to CString

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

13 years agoclearbufferonmsg: Skip detached chans
psychon [Tue, 28 Sep 2010 08:10:43 +0000 (08:10 +0000)] 
clearbufferonmsg: Skip detached chans

Since the user can't read detached channels, there is no point in clearing their
buffer. Let's leave them alone instead.

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

13 years agoAdd some (useless) api docs for CString
psychon [Mon, 27 Sep 2010 20:21:27 +0000 (20:21 +0000)] 
Add some (useless) api docs for CString

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

13 years agoCHTTPSock: Fix for latest commit
psychon [Mon, 27 Sep 2010 18:52:44 +0000 (18:52 +0000)] 
CHTTPSock: Fix for latest commit

We have to grab the contents of the read buffer before we do DisableReadLine().

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

13 years agoCsocket: Clear the buffer in DisableReadLine()
psychon [Mon, 27 Sep 2010 18:51:55 +0000 (18:51 +0000)] 
Csocket: Clear the buffer in DisableReadLine()

This clears the internal read buffer in DisableReadLine(). This fixes
"accidental bugs" where CHTTPSock does DisableReadLine() and then reads the post
data via ReadData(). The problem is when we do DisableReadLine() in ReadLine()
and then return from it. All the stuff is still in the read buffer which
triggers a MaxBufferReached() call which causes us to drop the connection.

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

13 years agoMore debugging output from modperl.
darthgandalf [Mon, 27 Sep 2010 14:45:42 +0000 (14:45 +0000)] 
More debugging output from modperl.

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

13 years agoImprove portability of modperl by trying several UUID generators.
darthgandalf [Mon, 27 Sep 2010 14:29:40 +0000 (14:29 +0000)] 
Improve portability of modperl by trying several UUID generators.

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

13 years agoFix some minor doxygen warnings
psychon [Mon, 27 Sep 2010 13:45:49 +0000 (13:45 +0000)] 
Fix some minor doxygen warnings

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

13 years agoFix spaces in modperl.
darthgandalf [Mon, 27 Sep 2010 13:30:54 +0000 (13:30 +0000)] 
Fix spaces in modperl.

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

13 years agoFix modperl. It didn't work.
darthgandalf [Mon, 27 Sep 2010 13:08:07 +0000 (13:08 +0000)] 
Fix modperl. It didn't work.

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

13 years agoRemove one more perl's pollution of global namespace which caused modperl loading...
darthgandalf [Mon, 27 Sep 2010 11:45:32 +0000 (11:45 +0000)] 
Remove one more perl's pollution of global namespace which caused modperl loading error under some circumstances.

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

13 years agoRemove unimplemented function from CTemplate.
darthgandalf [Mon, 27 Sep 2010 11:44:57 +0000 (11:44 +0000)] 
Remove unimplemented function from CTemplate.

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

13 years agoFix bug introduced in r2133: modperl made znc crash when using web.
darthgandalf [Thu, 23 Sep 2010 04:41:35 +0000 (04:41 +0000)] 
Fix bug introduced in r2133: modperl made znc crash when using web.

Adding new hooks to modules is the following procedure:
1. Add it to modperl/module.h
2. Add it to modperl/startup.pl
3. Add it to modperl/functions.in
4. Run ./codegen.pl

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

13 years agoDid some basic documentation on CSocket, probably needs more but this is a good start
imaginos [Tue, 21 Sep 2010 17:54:29 +0000 (17:54 +0000)] 
Did some basic documentation on CSocket, probably needs more but this is a good start

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

13 years agoModperl's CreateTimer function now supports named arguments.
darthgandalf [Mon, 20 Sep 2010 06:34:20 +0000 (06:34 +0000)] 
Modperl's CreateTimer function now supports named arguments.

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

13 years agoRearrange CAP requests between ZNC and server in a way
darthgandalf [Mon, 13 Sep 2010 17:00:50 +0000 (17:00 +0000)] 
Rearrange CAP requests between ZNC and server in a way
that each next REQ is sent only after receiving ACK/NAK
of previous REQ. Also now you can call CIRCSock::PauseCap()
and CIRCSock::ResumeCap() if you need to pause CAP negotiation
and process of logging in for a while.

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

13 years agoFix: modperl hooks didn't get bool arguments.
darthgandalf [Mon, 13 Sep 2010 16:27:20 +0000 (16:27 +0000)] 
Fix: modperl hooks didn't get bool arguments.

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

13 years agoReally fixed embedded web stuff after installation.
darthgandalf [Sun, 12 Sep 2010 18:19:45 +0000 (18:19 +0000)] 
Really fixed embedded web stuff after installation.
This introduces workaround, but templates can't look
the same filename in different directories...

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

13 years agoMake embedded web stuff to work even after install.
darthgandalf [Sun, 12 Sep 2010 17:27:51 +0000 (17:27 +0000)] 
Make embedded web stuff to work even after install.

Thanks to un1matr1x for reporting this.

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

13 years agoAdd new hook OnEmbeddedWebRequest to modperl.
darthgandalf [Sun, 12 Sep 2010 16:50:08 +0000 (16:50 +0000)] 
Add new hook OnEmbeddedWebRequest to modperl.

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

13 years agoStickychan module adds a checkbox to channel page of webadmin.
darthgandalf [Sat, 11 Sep 2010 18:53:57 +0000 (18:53 +0000)] 
Stickychan module adds a checkbox to channel page of webadmin.

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

13 years agoBlockuser module adds a checkbox to user page in webadmin.
darthgandalf [Sat, 11 Sep 2010 18:53:30 +0000 (18:53 +0000)] 
Blockuser module adds a checkbox to user page in webadmin.

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

13 years agoLastseen module embeds info about last login time to webadmin user page.
darthgandalf [Sat, 11 Sep 2010 18:52:51 +0000 (18:52 +0000)] 
Lastseen module embeds info about last login time to webadmin user page.

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

13 years agoWebadmin now supports embedding of web stuff to user and channel pages.
darthgandalf [Sat, 11 Sep 2010 18:52:24 +0000 (18:52 +0000)] 
Webadmin now supports embedding of web stuff to user and channel pages.

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

13 years agoModules can now embed web stuff directly to other web pages which support this feature.
darthgandalf [Sat, 11 Sep 2010 18:51:54 +0000 (18:51 +0000)] 
Modules can now embed web stuff directly to other web pages which support this feature.

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

13 years agoDon't fail make install if there're no perl modules in source dir.
darthgandalf [Fri, 10 Sep 2010 20:34:24 +0000 (20:34 +0000)] 
Don't fail make install if there're no perl modules in source dir.

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

13 years agoLastseen module doesn't display links to webadmin webpages anymore if webadmin isn...
darthgandalf [Thu, 9 Sep 2010 03:30:27 +0000 (03:30 +0000)] 
Lastseen module doesn't display links to webadmin webpages anymore if webadmin isn't loaded.

Patch by BrianC, thanks.

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

13 years agoFixed: modperl blocked loading of global modules.
darthgandalf [Thu, 9 Sep 2010 03:29:59 +0000 (03:29 +0000)] 
Fixed: modperl blocked loading of global modules.

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

13 years agoCIncomingConnection: Reject long input lines
psychon [Wed, 8 Sep 2010 17:41:10 +0000 (17:41 +0000)] 
CIncomingConnection: Reject long input lines

This should make DoS attacks that try to make znc eat lots of memory a lot
harder to do (= Don't bother trying).

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

13 years agoRename modperl/modperl_wrap.cxx to modperl/ZNC.cpp
darthgandalf [Wed, 8 Sep 2010 16:57:03 +0000 (16:57 +0000)] 
Rename modperl/modperl_wrap.cxx to modperl/ZNC.cpp

This should make psychon happier :)

Also small fix in Makefile to make swig header in another task.

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

13 years agomodperl: Move some common compiler flags to $(PERLCOMMON)
psychon [Wed, 8 Sep 2010 15:57:05 +0000 (15:57 +0000)] 
modperl: Move some common compiler flags to $(PERLCOMMON)

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

13 years agoconfigure: Correctly indent multi-line messages
psychon [Wed, 8 Sep 2010 15:42:03 +0000 (15:42 +0000)] 
configure: Correctly indent multi-line messages

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

13 years agoBig update of modperl module.
darthgandalf [Tue, 7 Sep 2010 11:13:47 +0000 (11:13 +0000)] 
Big update of modperl module.

Old modperl had several flaws and was very outdated.
New modperl makes the whole ZNC API accessible from inside perl.
Modperl API was changed, so old perl modules are not supported,
but they weren't used much anyway.

Modperl needs --enable-perl option to ./configure.

This introduces new dependence on SWIG, which is needed only while
compiling ZNC. So to use modperl, you need to install SWIG or
to download several files and use --disable-swig option of configure.

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

13 years agoAdd new global module hooks, which allow global modules to be 'module providers'.
darthgandalf [Tue, 7 Sep 2010 09:53:13 +0000 (09:53 +0000)] 
Add new global module hooks, which allow global modules to be 'module providers'.

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

13 years agoLoad global modules before users.
darthgandalf [Tue, 7 Sep 2010 09:52:49 +0000 (09:52 +0000)] 
Load global modules before users.

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

13 years agoCClient: Only auth users that sent a password
psychon [Sun, 5 Sep 2010 15:57:35 +0000 (15:57 +0000)] 
CClient: Only auth users that sent a password

We introduced a bug where sending "USER foo\r\nNICK foo\r\n" to znc would cause
an "invalid password" message even though no password was sent yet. This was
caused by a missing check.

This is easily fixed by checking whether we already received a password before
checking if the password is valid.

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

13 years agowebadmin: Remove an unused variable
psychon [Sun, 5 Sep 2010 15:30:55 +0000 (15:30 +0000)] 
webadmin: Remove an unused variable

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

13 years agoMore text describing what are multiple servers per user in --makeconf.
darthgandalf [Thu, 2 Sep 2010 16:32:11 +0000 (16:32 +0000)] 
More text describing what are multiple servers per user in --makeconf.

Also, hello ZNC svn! :)

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

13 years agosimple_away: Honour timzone offset setting
psychon [Mon, 30 Aug 2010 09:50:12 +0000 (09:50 +0000)] 
simple_away: Honour timzone offset setting

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

13 years agoRename "vhost" to "bindhost"
psychon [Mon, 30 Aug 2010 08:58:29 +0000 (08:58 +0000)] 
Rename "vhost" to "bindhost"

"virtual host" seems to be confusing to users since they wonder why
i.am.superman doesn't work. Let's rename this to "bindhost" and perhaps it
becomes clearer what this setting does.

Thanks to SilverLeo!

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

13 years agoroute_replies: Add 354 as a /who reply
psychon [Thu, 26 Aug 2010 19:01:39 +0000 (19:01 +0000)] 
route_replies: Add 354 as a /who reply

Apparently, standard /who isn't enough. To add some extra bling-bling "THE NEW
/WHO COMMAND" was invented. But the cake is a lie!

See http://ircu.sourceforge.net/release.2.10.01-who.html

Thanks to Wizeon for reporting this and Nirjen and Pyker for debugging.

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

13 years agoAdd 'make V=1'
psychon [Mon, 23 Aug 2010 17:51:40 +0000 (17:51 +0000)] 
Add 'make V=1'

This does the very same thing 'make VERBOSE=1' does.

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

13 years agoMake CString::strnchr() private
psychon [Mon, 23 Aug 2010 11:43:19 +0000 (11:43 +0000)] 
Make CString::strnchr() private

No idea what this function actually does, but it's only used internally in
CString. This also removes a bogus "inline".

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

13 years agoAdd an optional argument to /znc jump
psychon [Sun, 22 Aug 2010 12:09:47 +0000 (12:09 +0000)] 
Add an optional argument to /znc jump

If you have 10 servers in your server list and you want to directly jump to e.g.
irc.foo.bar, you can now do "/znc jump irc.foo.bar".

Thanks to PsWii60 for constantly bugging me for this.

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

13 years agoFix some function prototypes
psychon [Fri, 20 Aug 2010 16:40:56 +0000 (16:40 +0000)] 
Fix some function prototypes

CChan::OnOp() and CChan::OnVoice() were both undefinied.

These two prototypes confused the compiler when calling CSocket::Listen(1234)
since they both matched:

CSocket::Listen(unsigned short, bool=false, unsigned int=0);
Csock::Listen(unsigned short, int=SOMAXCONN, const CString&="", u_int=0);

Thanks to DarthGandalf for noticing these.

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

13 years agoAdd clearbufferonmsg module
psychon [Fri, 20 Aug 2010 15:02:36 +0000 (15:02 +0000)] 
Add clearbufferonmsg module

This module clears all channel buffers whenever the user does something. This
means that channel buffers will only be cleared after we are 100% sure they were
read. Yay for no longer losing buffer playback when the client breaks.

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

13 years agoIncrease the version number to 0.095
psychon [Fri, 20 Aug 2010 14:14:52 +0000 (14:14 +0000)] 
Increase the version number to 0.095

configure is now generated by autoconf 2.67 instead of 2.65.

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

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