Commit Graph

2006 Commits

Author SHA1 Message Date
psychon e00fa2176e 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
2010-06-16 18:48:30 +00:00
psychon 1fcb7b2bce 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
2010-06-13 17:14:52 +00:00
psychon 83d01ae0db 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
2010-06-13 07:58:28 +00:00
psychon d73933156a 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
2010-06-13 07:46:57 +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 99ea9c6ff7 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
2010-06-13 07:36:32 +00:00
psychon f6f4e6a6f8 Move some common code into CClient::AuthUser()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2021 726aef4b-f618-498e-8847-2d620e286838
2010-06-13 07:15:35 +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 a8b011fd50 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
2010-06-08 19:09:47 +00:00
psychon 68c5ee5909 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
2010-06-07 19:34:20 +00:00
psychon 39a215f35b 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
2010-06-07 19:05:51 +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
psychon f31621b305 Remove some unneeded functions from CWebSock
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2014 726aef4b-f618-498e-8847-2d620e286838
2010-06-07 12:38:24 +00:00
psychon 769f7623d9 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
2010-06-07 12:35:00 +00:00
psychon e4e9d295e5 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
2010-06-07 11:40:34 +00:00
cflakes f4b4eafc74 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
2010-06-06 11:41:31 +00:00
psychon a3ef9b2d40 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
2010-06-06 09:47:30 +00:00
psychon 35ef37acc4 Increase the version number to 0.091
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2009 726aef4b-f618-498e-8847-2d620e286838
2010-06-06 07:26:05 +00:00
psychon 501c76a4d5 Increase the version number to 0.090
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2007 726aef4b-f618-498e-8847-2d620e286838
2010-06-06 07:23:52 +00:00
cflakes 5a53fb4129 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
2010-05-29 20:11:48 +00:00
cflakes 0d16cbeb6a 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
2010-05-29 19:44:25 +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
cflakes 779401307e 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
2010-05-22 10:32:59 +00:00
psychon 01453c533b 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
2010-05-21 16:30:54 +00:00
psychon 4c3900f7a1 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
2010-05-20 20:24:30 +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 b7c2ab281b 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
2010-05-18 16:14:23 +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
psychon 38d6129964 Move the definition of _SKINDIR_ elsewhere
It's only used in WebModules.cpp and in contrast to the other #defines from
main.h, this one is not set in configure by default.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1996 726aef4b-f618-498e-8847-2d620e286838
2010-05-17 12:56:23 +00:00
psychon 62d645ede0 Remove default argument for CListener's constructor
It's not used and needs to go. Now!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1995 726aef4b-f618-498e-8847-2d620e286838
2010-05-17 12:55: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
psychon 034fa573ee Fix out-of-tree builds
It was looking for the webskins directory in the wrong spot.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1993 726aef4b-f618-498e-8847-2d620e286838
2010-05-16 13:15:10 +00:00
cflakes f68b10e0d9 Fixed /znc addport arguments in /znc help.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1992 726aef4b-f618-498e-8847-2d620e286838
2010-05-16 10:20:49 +00:00
cflakes ee692c88ed Improved looks of /znc listports output.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1991 726aef4b-f618-498e-8847-2d620e286838
2010-05-15 22:37:39 +00:00
cflakes bbca3e3254 Add "setting"/argument for adding web and IRC only ports via /znc addport.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1990 726aef4b-f618-498e-8847-2d620e286838
2010-05-15 22:33:19 +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 61a33b34fc Moved isRoot check to a place before the code for --makeconf.
Keeps users from doing --makeconf as root and then wondering why
ZNC complains when they try to start it up.
--makepass and --makepem still work as root.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1988 726aef4b-f618-498e-8847-2d620e286838
2010-05-15 18:00:34 +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 1794ecd8c2 Better error message if pkg-config is not found
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1983 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 18:44:25 +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 0c0c51172e WebModules: Make PAGE_DONE imply Close()
When one now finishes a web request with PAGE_DONE, the code actively calls
Close(CLT_AFTERWRITE) which one previously had to call explicitly. This means
there is finally a difference between PAGE_DONE and PAGE_DEFERRED. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1981 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 15:54:06 +00:00
psychon 3dbb918164 Remove some empty directory
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1980 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 13:51:58 +00:00
psychon ed9d1993f9 Some love for the man page
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1979 726aef4b-f618-498e-8847-2d620e286838
2010-05-10 20:16:04 +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
psychon e80bf15cb9 Add and use new config option "Listener"
This is what each option does:

Listen on ipv4 and ipv6: Listener, Listen6
Listen on ipv4 only:     Listener4, Listen4, Listen
Listen on ipv6 only:     Listener6
Removed:     ListenPort (not used since at least 0.047)

(ZNC will only ever use Listener* by itself)

This was done to preserve the old meaning of "Listen" and "Listen6", so that
user configs don't break after update.

Thanks to DarthGandalf for thinking about and implementing this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1977 726aef4b-f618-498e-8847-2d620e286838
2010-05-10 17:45:15 +00:00