Commit Graph

2202 Commits

Author SHA1 Message Date
psychon 6d33c5702b 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
2010-07-10 07:15:21 +00:00
psychon 8b5ba0f186 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
2010-07-10 07:10:16 +00:00
psychon e0dda30871 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
2010-07-10 06:53:10 +00:00
psychon 47a5ab3751 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
2010-07-09 18:02:04 +00:00
psychon 9ae959b800 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
2010-07-08 16:43:23 +00:00
psychon 94ea2c6c42 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
2010-07-08 16:38:18 +00:00
psychon 430898be46 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
2010-07-08 16:05:40 +00:00
psychon 4410096e0b 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
2010-07-08 15:43:04 +00:00
psychon 5ef5bc3be0 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
2010-07-07 20:43:54 +00:00
psychon 9d99e4cc8d 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
2010-07-07 16:01:15 +00:00
silverleo 3e150b98f5 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
2010-07-06 15:38:21 +00:00
psychon e1d214bf03 Remove a bogus AC_MSG_RESULT
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2069 726aef4b-f618-498e-8847-2d620e286838
2010-07-05 17:23:19 +00:00
psychon dabbf886d6 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
2010-07-05 17:11:23 +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 b667c0ed96 Add Joshua M. Clulow to AUTHORS
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2066 726aef4b-f618-498e-8847-2d620e286838
2010-07-05 16:14:45 +00:00
psychon 33ce80f476 Use fcntl() instead of flock() for locking the config file
fcntl() is more portable than flock() so this makes znc run on more systems
(everyone smile and say hi to solaris). The downside is that fcntl() locks are
lost if *any* fd referring to that file is closed (luckily we don't do that).

The big downside is that the child process after fork() does not inherit the
lock. To work around this, when znc forks into the background, the child process
immediately blocks and tries to get the lock on the config file. Once the parent
releases the lock by exiting, the child will get it.

This shouldn't cause races with other ZNCs, because in every other place we
don't block waiting for a lock but instead abort immediately if the file is
already locked.

Thanks to LeftWing aka Joshua M. Clulow for making znc work on solaris (and
automatically fixing some issues with NFS in the process).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2065 726aef4b-f618-498e-8847-2d620e286838
2010-07-05 16:13:23 +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 b00bbdfbec Made <th> usuable in all skins. The new policy is to use <thead>(<td>...</td>)+</thead> for horizontal headers and <th> for vertical ones.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2062 726aef4b-f618-498e-8847-2d620e286838
2010-07-04 17:44:03 +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 17e7b0f4cf Increase the version number to 0.093
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2059 726aef4b-f618-498e-8847-2d620e286838
2010-07-03 09:39:39 +00:00
psychon 4c69e66dec Make --with-openssl do more
It now also adds lib64 to the library search path. On 32-bit systems this won't
hurt because such a directory most likely does not exist.

Also, because we are trying to find pkg-config via openssl first, the
appropriate dirs are also added to $PKG_CONFIG_PATH.

Thanks to DarthGandalf for some good suggestions on this one.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2056 726aef4b-f618-498e-8847-2d620e286838
2010-07-03 07:56:04 +00:00
psychon a4d46e8c3c Check for c-ares 1.5.0 or later in configure
There was an API change to the callback type of ares_gethostbyname() in 1.5.0,
so znc won't compile with anything older than that.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2055 726aef4b-f618-498e-8847-2d620e286838
2010-07-03 07:52:46 +00:00
psychon 811b04dfce Add aclocal.m4 and regenerate configure
The always-changing versions of the pkg-config m4 macros are mildly annoying.
To work around this, we now have a file aclocal.m4 (generated by aclocal) that
contains all the needed external macros. If you just call "autoconf", it will
use the macros from that file. "autoreconf" will call "aclocal" and "autoconf"
so that both files are up-to-date.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2054 726aef4b-f618-498e-8847-2d620e286838
2010-07-03 07:50:22 +00:00
psychon 3bdb150d9a Update to latest Csocket
This fixes a bug where the wrong errno value was used for SockError(). This also
fixes a busy loop caused by broken c-ares timeout handling on our side.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2052 726aef4b-f618-498e-8847-2d620e286838
2010-07-02 20:03:41 +00:00
psychon 22a641a08c Correctly handle CAP REQ
The old code only looked at the first capability request.

Found and patched by DarthGandalf, thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2048 726aef4b-f618-498e-8847-2d620e286838
2010-06-30 17:39:39 +00:00
psychon 84abd9ec1a Remove OnUser{Attached,Detached}
These are unused functions that are only used for generating warning messages
due to -Woverloaded-virtual. These were introduced in 2008. I think nothing
needs this any more, so let's just remove these for good. Bye, bye.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2047 726aef4b-f618-498e-8847-2d620e286838
2010-06-29 19:07:04 +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 b3d6a86f68 Changed some text strings in --makeconf, idea & first patch by DGandalf, thanks
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2045 726aef4b-f618-498e-8847-2d620e286838
2010-06-27 01:15: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 bc40713b61 Rethink PING/PONG handling
All PINGs are replied by ZNC, only PINGs from the client are forwarded.
All PONGs are blocked.

This should solve all issues with annoying PONGs showing up in clients.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2043 726aef4b-f618-498e-8847-2d620e286838
2010-06-25 15:51:16 +00:00
psychon ced990fb87 Patch by DarthGandalf, thanks.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2042 726aef4b-f618-498e-8847-2d620e286838
2010-06-24 19:42:51 +00:00
psychon 04838648d2 Correctly handle large CAP lists from the IRCd
As DarthGandalf noticed, the spec asks for an "*" to be prepended if the reply
needs to be split up into multiple lines. It doesn't really matter for the
current code, but let's make this future-proof. :)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2041 726aef4b-f618-498e-8847-2d620e286838
2010-06-22 16:14:31 +00:00
psychon 9ff7a3d05e Remove CHTTPSock::GetErrorPage()
There is no valid reason to use GetErrorPage() instead of PrintErrorPage() which
can be seen from the fact that all the existing callers are *wrong*. So, to
avoid this mistake in the future, inline GetErrorPage() into its only valid
caller (PrintErrorPage()).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2040 726aef4b-f618-498e-8847-2d620e286838
2010-06-22 15:26:17 +00:00
psychon 6d16047113 WebMods: Use PrintErrorPage() instead of GetErrorPage()
GetErrorPage() only generates the HTML for the error page while PrintErrorPage()
actually makes sure the error page is sent with the correct HTTP status code.
(We sent all error pages with status "200 OK"!)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2039 726aef4b-f618-498e-8847-2d620e286838
2010-06-22 15:18:56 +00:00
cflakes 6924248938 Changed OnKick module call to be useful.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2038 726aef4b-f618-498e-8847-2d620e286838
2010-06-22 15:00:50 +00:00
psychon 3cb25965e1 Don't accept extra arguments to znc as a config file name
It's much wiser to specify a whole --datadir because two znc instances running
on the same datadir but different configs just calls for problems.

Patch by DarthGandalf, some messing by me, idea by various.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2037 726aef4b-f618-498e-8847-2d620e286838
2010-06-22 14:35:10 +00:00
cflakes 26396b1b06 Revert unintended change from revision 2029 and added a comment so it won't happen again.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2036 726aef4b-f618-498e-8847-2d620e286838
2010-06-21 12:51:37 +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
cflakes 0b6c5cc11a Yay for pink invisible unicorns! yay!
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2033 726aef4b-f618-498e-8847-2d620e286838
2010-06-19 20:03:13 +00:00
cflakes 6678454b9f Removed a huge comment of unused code from Utils.cpp
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2032 726aef4b-f618-498e-8847-2d620e286838
2010-06-19 19:37:05 +00:00
cflakes 859c4ea182 Made CTable not crash if someone failed at coding at tries to
assign a value to a non-existant column. Found and first patch by BrianC, thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2031 726aef4b-f618-498e-8847-2d620e286838
2010-06-19 19:31:42 +00:00
cflakes 114bb25aa8 Fixed an issue identified by Un1matr1x: If you were running two 0.090 ZNCs on the same IP,
(but different ports), any web login session from ZNC #1 would overwrite the session from
ZNC #2. While doing this, also removed an unnecessary check in CHTTPSock::SendCookie and
CHTTPSock::GetRequestCookies (which doesn't transparently translate cookie names and has
never been used so far).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2030 726aef4b-f618-498e-8847-2d620e286838
2010-06-19 19:07:24 +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 e5ecd9c944 Micro optimization
Only call GetUser() when we actually need the result


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2028 726aef4b-f618-498e-8847-2d620e286838
2010-06-16 19:11:07 +00:00
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