Commit Graph

2106 Commits

Author SHA1 Message Date
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
darthgandalf
9109df9227 Load global modules before users.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2118 726aef4b-f618-498e-8847-2d620e286838
2010-09-07 09:52:49 +00:00
psychon
8af157cc69 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
2010-09-05 15:57:35 +00:00
psychon
4b74817fdf webadmin: Remove an unused variable
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2116 726aef4b-f618-498e-8847-2d620e286838
2010-09-05 15:30:55 +00:00
darthgandalf
35ae34fa42 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
2010-09-02 16:32:11 +00:00
psychon
6acb811687 simple_away: Honour timzone offset setting
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2114 726aef4b-f618-498e-8847-2d620e286838
2010-08-30 09:50:12 +00:00
psychon
341263f9ec 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
2010-08-30 08:58:29 +00:00
psychon
b2c3c0707a 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
2010-08-26 19:01:39 +00:00
psychon
877c5775b7 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
2010-08-23 17:51:40 +00:00
psychon
8938fd719d 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
2010-08-23 11:43:19 +00:00
psychon
2becac12ba 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
2010-08-22 12:09:47 +00:00
psychon
dbb767ca65 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
2010-08-20 16:40:56 +00:00
psychon
2312d611be 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
2010-08-20 15:02:36 +00:00
psychon
3ca36c4af7 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
2010-08-20 14:14:52 +00:00
psychon
e1b4abe05c Increase the version number to 0.094
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2104 726aef4b-f618-498e-8847-2d620e286838
znc-0.094
2010-08-20 14:12:15 +00:00
psychon
09c4f1466a Beware of flying spaghetti monsters, they bite.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2103 726aef4b-f618-498e-8847-2d620e286838
2010-08-18 07:59:55 +00:00
psychon
a4f8133e15 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
2010-08-18 07:57:23 +00:00
psychon
c26ef8d45f 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
2010-08-09 13:17:08 +00:00
psychon
a3bc3f6877 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
2010-08-05 12:13:44 +00:00
psychon
83db7684f2 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
2010-08-04 18:50:44 +00:00
psychon
3dd57bdf06 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
2010-08-03 17:25:59 +00:00
psychon
88daf2fa5a 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
2010-08-03 17:23:37 +00:00
psychon
e48a6be48d 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
2010-08-03 11:37:52 +00:00
psychon
d0e3572afe 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
2010-08-03 10:49:03 +00:00
psychon
c91d032e6b 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
2010-08-03 10:01:36 +00:00
psychon
e86008ffe0 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
2010-08-03 09:50:32 +00:00
psychon
564226c0ec 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
2010-07-24 20:34:26 +00:00
cflakes
eafccc7b7d 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
2010-07-21 17:53:07 +00:00
psychon
f7c6d90478 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
2010-07-20 17:31:17 +00:00
cflakes
a09ad1249f 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
2010-07-17 15:02:16 +00:00
psychon
f82f3cf069 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
2010-07-16 21:11:10 +00:00
psychon
1fd22431a0 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
2010-07-16 21:01:50 +00:00
psychon
7f53cc810b 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
2010-07-14 18:51:12 +00:00
psychon
e4006adc11 DarthGandalf does not approve
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2085 726aef4b-f618-498e-8847-2d620e286838
2010-07-10 17:09:51 +00:00