Commit Graph

678 Commits

Author SHA1 Message Date
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
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
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
eb307ddc6f 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
2010-07-05 16:35:48 +00:00
psychon
84ae0f2edd 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
2010-07-05 15:54:03 +00:00
cflakes
2c454e5232 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
2010-07-04 18:30:39 +00:00
cflakes
1110d2e1ac 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
2010-07-04 17:18:59 +00:00
psychon
9c92d93ac4 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
2010-06-29 18:58:14 +00:00
cflakes
17fdd7e8bb 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
2010-06-27 01:04:55 +00:00
psychon
af5ae4b877 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
2010-06-20 15:47:07 +00:00
psychon
d38953f02c 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
2010-06-20 10:32:29 +00:00
psychon
b2f564aeaf 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
2010-06-16 19:56:07 +00:00
psychon
6c405e7239 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
2010-06-13 07:37:47 +00:00
psychon
e62ca4112d 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
2010-06-12 20:20:33 +00:00
psychon
7b240d5330 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
2010-06-07 12:41:56 +00:00
psychon
ffdfd8f8d7 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
2010-06-07 12:39:16 +00:00
cflakes
88f2d64ee1 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
2010-05-22 10:34:11 +00:00
psychon
703a5e879f 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
2010-05-18 16:16:04 +00:00
psychon
8965b35104 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
2010-05-17 13:31:17 +00:00
psychon
c6b5a4d4db 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
2010-05-17 13:25:17 +00:00
cflakes
50c4acf86d Added a "-force" mode to the charset module,
so it's useful for even more people.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1994 726aef4b-f618-498e-8847-2d620e286838
2010-05-16 20:28:34 +00:00
cflakes
70e46ac174 Improved perform module description.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1989 726aef4b-f618-498e-8847-2d620e286838
2010-05-15 22:13:10 +00:00
cflakes
4ba78a6ab8 <psychon> someone should commit the one-liner which makes the CListener created by webadmin always be CListener::ACCEPT_HTTP
<psychon> since that's the old behavior anyway


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1987 726aef4b-f618-498e-8847-2d620e286838
2010-05-14 09:00:46 +00:00
cflakes
7e062b086a Made the lastseen table look better by applying more grammarz.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1986 726aef4b-f618-498e-8847-2d620e286838
2010-05-14 08:59:19 +00:00
cflakes
472ee9795e Added some debug output to the charset module.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1985 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 22:58:32 +00:00
psychon
e8d9ba43c0 webadmin: Automatically convert module arguments
This patch makes webadmin automatically open its own listening port if it gets
a port number on the command line. It also handles -noircport etc. Basically, it
handles everything. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1984 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 19:49:52 +00:00
psychon
fbe5dd10e7 Move module templates to DATADIR
The file hierarchy standard wants that!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1982 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 16:51:17 +00:00
psychon
b5e09d7c84 Notes: Add some missing returns
When deleting a note via /#-<key> or listening the available notes via /#?, the
code somehow managed to add a note.

Also, this fixes checking for empty notes.

Found by tomaw, thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1978 726aef4b-f618-498e-8847-2d620e286838
2010-05-10 18:19:11 +00:00
cflakes
bd1af54f1c Charset module:
- Added some comments
- Fixed some places where iconv_close may have been called two times on the same
handle which apparently crashed some implementations. Woops. Thanks to x-demon
for noticing.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1975 726aef4b-f618-498e-8847-2d620e286838
2010-05-09 20:13:19 +00:00
cflakes
08463bedac Make webadmin show whether a Listener/port accepts IRC and/or HTTP connections.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1974 726aef4b-f618-498e-8847-2d620e286838
2010-05-09 19:08:41 +00:00
silverleo
3b9392a0b3 Fixed modtcl result fetching from the interpreter.
Tcl 8.6 no longer supports accessing the result field directly,
so we now use the public getter.

Thanks to flakes for finding this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1970 726aef4b-f618-498e-8847-2d620e286838
2010-05-09 17:24:02 +00:00
psychon
99f1efc843 Some more fun with tabs
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1966 726aef4b-f618-498e-8847-2d620e286838
2010-05-02 08:36:57 +00:00
cflakes
ca394439ec Removed an unnecessary admin check from the new traffic page.
Sorry for not noticing this earlier :(


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1959 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 12:07:23 +00:00
cflakes
af0dd16d1d Added a "Traffic Info" page to webadmin. 99% of the patch have been done
by BrianC, so thanks again.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1958 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 12:04:44 +00:00
psychon
20c79083de Don't use "ip:port" but "ip port" for display purposes
With ipv6 addresses, ip:port just looks wrong.

Found by KiNgMaR, thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1955 726aef4b-f618-498e-8847-2d620e286838
2010-04-30 10:50:33 +00:00
cflakes
7d7106748e disconkick module: Only send a kick to channels that the client is actually joined to,
avoid massive kick spam when re-connecting repeatedly and rapidly fails.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1952 726aef4b-f618-498e-8847-2d620e286838
2010-04-29 10:31:47 +00:00
cflakes
73c6a32742 Another patch by BrianC, building upon the previous revision,
this uses the new sort feature to sort channel tables in stickychan's
and webadmin's channel tables and webadmin's user table, also the module
names in the menu. Hooray!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1949 726aef4b-f618-498e-8847-2d620e286838
2010-04-28 22:00:26 +00:00
cflakes
dee94a0bb8 Added the necessary checks for (lib)iconv in order to enable
the charset module from extra to do its thing. This has been
a pain in the ass and I'd like to thank psychon who made most
of the autofoo happen and BrianC for finding out that BSD sucks
and for testing! Yay!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1947 726aef4b-f618-498e-8847-2d620e286838
2010-04-27 15:40:24 +00:00
cflakes
136ce32f85 Fixed some weird code in webadmin.cpp that prevented
module arguments from showing up with the new GetParam().


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1944 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 21:58:56 +00:00
cflakes
08d1d248e2 BrianC totally pimped the del_user page.
"Yo ZNC, we heard you like deleting users so we put a delete button in your
delete user page so you can delete while you delete."


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1943 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 21:49:07 +00:00
cflakes
4274bdc5d1 Add the cool charset module to "extra". It normalizes character sets,
so if your client sends e.g. ISO-8859-1, and users on your IRC server
want UTF-8, this module can help you.
Or, the other way around, if users on your IRC server send messages
with weird charsets that your client doesn't understand, this module
can convert them to UTF-8 or something for you (as long as you know
the names of the source charsets, at least).
More explanation will be added to the wiki shortly.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1942 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 21:45:13 +00:00
cflakes
fb8b8e4258 Fixed lastseen template to reflect the new user deletion confirmation page.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1941 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 20:43:23 +00:00
cflakes
50451bec2f Fixed GetParam call in the notes module.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1940 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 20:37:24 +00:00
cflakes
e8791a85ec Make del_user page look nicer.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1939 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 20:36:42 +00:00
cflakes
db9a9bfaa9 Adjusted the GetParam calls in webadmin.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1938 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 20:33:03 +00:00
psychon
2e6881c378 Webadmin: Use a dedicated page for confirming user deletes
The old Javascript way didn't work when one had javascript disabled.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1937 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 14:46:45 +00:00
cflakes
298d7f0997 WebMods: Following the last commit, this adds the CSRF check token
to existing action="post" forms. Right now, we don't have much of a
real protection against CSRF yet, but psychon is working on making
that happen :)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1933 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 13:35:06 +00:00
psychon
46b70f654d Move the HTTP/IRC switching to CIncomingConnection
This new class waits for the first line from the client and checks if it's an
HTTP request and then passes the connection on to the irc or http code.

Before this, the IRC parser handled this as a special case which wasn't as
nice-looking as this is. :)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1925 726aef4b-f618-498e-8847-2d620e286838
2010-04-15 18:20:12 +00:00