Commit Graph

2139 Commits

Author SHA1 Message Date
psychon fcd8df5c87 Increase the version number to 0.097
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2169 726aef4b-f618-498e-8847-2d620e286838
2010-11-06 14:57:13 +00:00
psychon 27c129633f Increase the version number to 0.096
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2167 726aef4b-f618-498e-8847-2d620e286838
znc-0.096
2010-11-06 14:55:25 +00:00
darthgandalf 3c1b5d8f70 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
2010-10-26 16:20:57 +00:00
psychon a785b0dc08 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
2010-10-24 09:04:17 +00:00
cflakes d3279f9707 lastseen module: replaced some obnoxious code :P
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2164 726aef4b-f618-498e-8847-2d620e286838
2010-10-23 11:50:57 +00:00
cflakes ceebe40c2b 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
2010-10-23 11:46:15 +00:00
psychon e93523c42e 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
2010-10-21 17:27:19 +00:00
psychon c9278e8f72 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
2010-10-21 16:12:03 +00:00
darthgandalf 5df13a3eda 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
2010-10-17 09:27:15 +00:00
psychon 7ab492ed22 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
2010-10-17 08:42:07 +00:00
psychon 1c6facc1ce 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
2010-10-11 14:45:17 +00:00
psychon 4ffcdc4b55 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
2010-10-11 14:24:36 +00:00
darthgandalf 9c2692f1f1 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
2010-10-10 09:59:15 +00:00
psychon 8a690170e3 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
2010-10-02 12:39:20 +00:00
psychon 0ca947122d 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
2010-09-30 08:08:54 +00:00
psychon 0f9f24683f 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
2010-09-29 16:53:07 +00:00
psychon a9b07dafaa Add some more API docs to CString
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2152 726aef4b-f618-498e-8847-2d620e286838
2010-09-28 11:42:20 +00:00
psychon 8e7ac59d25 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
2010-09-28 08:10:43 +00:00
psychon c11b00c192 Add some (useless) api docs for CString
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2150 726aef4b-f618-498e-8847-2d620e286838
2010-09-27 20:21:27 +00:00
psychon aca3535c8d 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
2010-09-27 18:52:44 +00:00
psychon 2809dd1108 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
2010-09-27 18:51:55 +00:00
darthgandalf 768093b792 More debugging output from modperl.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2147 726aef4b-f618-498e-8847-2d620e286838
2010-09-27 14:45:42 +00:00
darthgandalf 14ffd7c769 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
2010-09-27 14:29:40 +00:00
psychon ae5e260849 Fix some minor doxygen warnings
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2145 726aef4b-f618-498e-8847-2d620e286838
2010-09-27 13:45:49 +00:00
darthgandalf a30a201338 Fix spaces in modperl.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2144 726aef4b-f618-498e-8847-2d620e286838
2010-09-27 13:30:54 +00:00
darthgandalf 9fe92c3725 Fix modperl. It didn't work.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2143 726aef4b-f618-498e-8847-2d620e286838
2010-09-27 13:08:07 +00:00
darthgandalf fa8f758c7b 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
2010-09-27 11:45:32 +00:00
darthgandalf 79d7a3971e Remove unimplemented function from CTemplate.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2141 726aef4b-f618-498e-8847-2d620e286838
2010-09-27 11:44:57 +00:00
darthgandalf 6743674646 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
2010-09-23 04:41:35 +00:00
imaginos a123bf3ce9 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
2010-09-21 17:54:29 +00:00
darthgandalf 4b54649506 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
2010-09-20 06:34:20 +00:00
darthgandalf 633c225811 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
2010-09-13 17:00:50 +00:00
darthgandalf 1d6f11f71a 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
2010-09-13 16:27:20 +00:00
darthgandalf 417018172c 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
2010-09-12 18:19:45 +00:00
darthgandalf 62e25df78b 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
2010-09-12 17:27:51 +00:00
darthgandalf 0b69ae8bd4 Add new hook OnEmbeddedWebRequest to modperl.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2133 726aef4b-f618-498e-8847-2d620e286838
2010-09-12 16:50:08 +00:00
darthgandalf a440da25c6 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
2010-09-11 18:53:57 +00:00
darthgandalf 27496f6c85 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
2010-09-11 18:53:30 +00:00
darthgandalf 45c7561485 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
2010-09-11 18:52:51 +00:00
darthgandalf 8d5921f966 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
2010-09-11 18:52:24 +00:00
darthgandalf dffabfed2e 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
2010-09-11 18:51:54 +00:00
darthgandalf ced8aa82ed 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
2010-09-10 20:34:24 +00:00
darthgandalf 70ae4bab6f 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
2010-09-09 03:30:27 +00:00
darthgandalf 83f6366473 Fixed: modperl blocked loading of global modules.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2125 726aef4b-f618-498e-8847-2d620e286838
2010-09-09 03:29:59 +00:00
psychon f9d2f614db 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
2010-09-08 17:41:10 +00:00
darthgandalf 20a9002953 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
2010-09-08 16:57:03 +00:00
psychon 992351b9d6 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
2010-09-08 15:57:05 +00:00
psychon 5b32bc8659 configure: Correctly indent multi-line messages
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2121 726aef4b-f618-498e-8847-2d620e286838
2010-09-08 15:42:03 +00:00
darthgandalf a44e6eaada 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
2010-09-07 11:13:47 +00:00
darthgandalf ffcd42232f 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
2010-09-07 09:53:13 +00:00