Commit Graph

2278 Commits

Author SHA1 Message Date
Alexey Sokolov
080bf674e0 Add perl module perleval.
It allows you to evaluate perl code you /msg to it.
2011-02-19 21:37:03 +06:00
Alexey Sokolov
92304835ef Show list of common modules in --makeconfig without any question before it.
"Don't ask to ask!"
2011-02-19 21:24:50 +06:00
Uli Schlachter
fbd8d69c50 Partly revert commit 7784492
"Don't force --foreground when compiled with --enable-debug"

Instead, this is now wrapped in an #ifdef ALWAYS_RUN_IN_FOREGROUND, so that I
can use ./configure CXXFLAGS="-DALWAYS_RUN_IN_FOREGROUND".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-19 13:51:58 +01:00
Alexey Sokolov
20e771c4a2 Merge branch 'master' of github.com:znc/znc 2011-02-19 11:35:36 +06:00
Alexey Sokolov
f5fe9868e1 Provide link to wiki page from header comment of znc.conf 2011-02-19 10:04:25 +06:00
Uli Schlachter
4faad67f81 admin: Allow omitting of the user name with some commands
This changes admin to assume that an "empty username" was specified if some
arguments is empty which shouldn't be empty. This empty username is then
interpreted as meaning the current user.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 14:50:12 +01:00
Uli Schlachter
3f0e200073 Admin: Add functions for listing/adding/removing CTCP replies
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 14:50:12 +01:00
Uli Schlachter
c1bb18b9e8 Add CUser::DelCTCPReply()
This function is the counterpart for CUser::AddCTCPReply(). Guess what? It
removes an entry from CUser::m_mssCTCPReplies again! It's magic!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 14:50:12 +01:00
Uli Schlachter
2ccafaf516 Add CTable::empty
It shouldn't make any real difference (especially not for std::vector), but
"empty()" is better than using "size() == 0".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 14:50:12 +01:00
Uli Schlachter
e7fc8fa907 CUser::AddCTCPReply(): Reject CTCP requests containing spaces
CTCP requests can't contain spaces so it's useless to specify rules for those.

This doesn't affect any of the existing callers because those use Token(0) for
generating the first argument to this function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 14:50:12 +01:00
Uli Schlachter
4ed833abbd Remove a useless lookup
All the places that add entries to the CTCPReplies map use CString::Token(0) to
split the first token away. This means it is impossible for this to contain
spaces. Now this means that it is pointless to look up the full CTCP request in
the CTCPReplies map because it can't contain any matching item.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 14:50:12 +01:00
Alexey Sokolov
7784492234 Don't force --foreground when compiled with --enable-debug 2011-02-18 19:41:43 +06:00
Uli Schlachter
cc552fb3f5 Update to latest Csocket
We are using a vanilla version of Csocket again. Previously, our copy of
Csocket.h had a new '#include "zncconfig.h"'.

The other changes are mostly cleanup for various compiler warnings. The switch
from inet_ntoa() to inet_ntop() is for thread-safety reasons.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 11:56:39 +01:00
Uli Schlachter
32e89efa95 Fix some minor spelling weirdness
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 10:46:53 +01:00
Uli Schlachter
2dcf79cedc Move modtcl into modules/
If you did ./configure --enable-tcl, tcl wasn't actually enabled because
--enable-extra was missing, That's less than optimal.

Just moving modtcl out of modules/extra solves this problem.

Big thanks go to zynox/kylef for noticing this!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-17 17:45:46 +01:00
Uli Schlachter
a533066dc6 Call modules for /MODE done by not-in-channel nicks
When ChanServ ops someone in a channel without joining first, znc didn't call
modules for this event, because it couldn't figure out a CNick* instance to use

Instead, the module hooks are now executed with a temporary CNick instance which
is created by CIRCSock anyway.

Big thanks to Robby for reporting this and helping me test it!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-16 12:53:06 +01:00
Nick Bebout
087f01e99b Fix URL to not point to sourceforge 2011-02-15 20:48:49 -06:00
Kyle Fuller
c7c12f0b83 CModules::OpenModule shouldn't return false 2011-02-15 20:06:50 +00:00
Kyle Fuller
e6bff0c367 Use Markdown for the README file 2011-02-14 18:36:54 +00:00
Uli Schlachter
86c0e97c85 .gitignore: Add some more rules
This now also ignores the generated files due from modpython and modperl and
some more fun.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-14 17:19:29 +01:00
Uli Schlachter
2d27386ced Merge branch 'ignore' of https://github.com/kylef/znc 2011-02-14 17:10:41 +01:00
Alexey Sokolov
9cbd494588 Merge branch 'master' of github.com:znc/znc 2011-02-14 21:37:11 +06:00
Alexey Sokolov
2ffcd25fac Merge branch 'master' of github.com:DarthGandalf/znc 2011-02-14 21:36:20 +06:00
Alexey Sokolov
c5e71b946f Merge branch 'readme' of https://github.com/kylef/znc into kylef-readme 2011-02-14 21:19:49 +06:00
Uli Schlachter
b37e239328 webadmin: Allow admins to ignore MaxBufferSize
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-14 14:56:09 +01:00
Uli Schlachter
0d928cd3c7 Make the output of "/znc help" smaller
The explanation for the arguments for AddPort and DelPort can still be reached
via e.g. "/znc addport". Removing this makes the output from /znc help a lot
smaller.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-14 14:53:34 +01:00
Uli Schlachter
d728fb98cc Remove some outdated comment
Since b359f968 / r2171 this comment is outdated, but someone (*cough*) forgot to
remove it back then.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-14 14:23:20 +01:00
Kyle Fuller
ed1780405b Update the README file, removing references to sourceforge and svn. Using git instead. 2011-02-13 21:33:31 +00:00
Kyle Fuller
daa610b902 Add a .gitignore file 2011-02-13 21:16:13 +00:00
flakes
65ae83fa19 Admin module: Added /msg *admin reconnect <user> and /msg *admin disconnect <user> commands. Can someone test this? :P 2011-02-13 14:19:27 +01:00
psychon
dd87a7e56d Add "-ggdb" with --enable-debug again
This is accidentally broken since r2248.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2278 726aef4b-f618-498e-8847-2d620e286838
2011-02-13 08:05:20 +00:00
silverleo
1e35eafbb3 psychon would say there's nothing to see here
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2277 726aef4b-f618-498e-8847-2d620e286838
2011-02-05 15:51:07 +00:00
silverleo
ad9667dd3e Fix the IsAdmin checks for the SetBufferCount
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2276 726aef4b-f618-498e-8847-2d620e286838
2011-02-02 13:14:22 +00:00
psychon
e66b244f35 Accept wildcards for DetachChan, EnableChan, ClearBuffer and SetBuffer
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2275 726aef4b-f618-498e-8847-2d620e286838
2011-01-26 16:58:17 +00:00
darthgandalf
a284e0260a Fix a mistake in code, which unloads perl modules.
Perl API should be used properly.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2274 726aef4b-f618-498e-8847-2d620e286838
2011-01-24 18:22:43 +00:00
darthgandalf
ae82eec1ac Fix warnings "variable 'ax' set but not used [-Wunused-but-set-variable]" of modperl.
http://perldoc.perl.org/perlcall.html wants us to declare and set this variable,
but it seems that not every perl actually uses it.
So let me introduce you this small workaround which uses ax's value.

Thanks to nb for reporting this.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2273 726aef4b-f618-498e-8847-2d620e286838
2011-01-24 18:18:42 +00:00
cflakes
ddd302fbf5 clearbuffersonmsg module in znc-extra: removed OnUserJoin and OnClientLogin hooks. This means that those events will no longer clear the buffer and thereby make the module more useful. You can now e.g. use it to get all the benefits of KeepBuffer = true, but still have the buffer cleared whenever you do something (we assume that doing something means you have read all previous messages).
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2272 726aef4b-f618-498e-8847-2d620e286838
2011-01-23 21:12:12 +00:00
darthgandalf
85a270661b A cleanup in configure.ac on how to find library with dlopen.
This shouldn't break anything.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2271 726aef4b-f618-498e-8847-2d620e286838
2011-01-22 13:30:07 +00:00
silverleo
58aaf7592c Fix a compile warning on 32bit systems.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2270 726aef4b-f618-498e-8847-2d620e286838
2011-01-18 14:21:17 +00:00
darthgandalf
6b396fca7f Fix for last commit.
Also remove perl magic from modperl/Makefile.inc which was used to suppress a warning.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2269 726aef4b-f618-498e-8847-2d620e286838
2011-01-15 21:04:25 +00:00
darthgandalf
f76f1e7a25 Modpython and modperl bindings should have proper dependencies on headers in makefiles.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2268 726aef4b-f618-498e-8847-2d620e286838
2011-01-15 20:28:25 +00:00
darthgandalf
3422d95780 Add copyright header for some files of modpython which were forgotten before.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2267 726aef4b-f618-498e-8847-2d620e286838
2011-01-15 19:01:14 +00:00
darthgandalf
81c864d025 Only admins should be able to load email module.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2266 726aef4b-f618-498e-8847-2d620e286838
2011-01-15 17:08:57 +00:00
darthgandalf
37b70a2949 Fix build on cygwin.
All shared objects produced a warning, and ZNC couldn't start after make install.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2265 726aef4b-f618-498e-8847-2d620e286838
2011-01-15 05:10:43 +00:00
psychon
bf6dc459db WebModules: Fix a crash during shutdown
During shutdown, the global list of sessions is destroyed. The new multimap
which counts sessions per address is also destroyed. However, they are destroyed
in unspecified order. This is not what we want because destructing the session
map also destroyed all the sessions which then has to access the sessions-per-ip
multimap. This obviously crashes if the multimap was already destroyed.

The fix here is to introduce a new class that contains both of those maps and
makes sure all the sessions are destroyed before the maps are destroyed
themselves. I hope this description makes some sense...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2264 726aef4b-f618-498e-8847-2d620e286838
2011-01-14 22:03:33 +00:00
psychon
913a3c8ded Limit the number of web sessions per IP to 5
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2263 726aef4b-f618-498e-8847-2d620e286838
2011-01-14 20:22:43 +00:00
psychon
4556cc7c9b WebMods: Verify a session belongs to the remote IP address
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2262 726aef4b-f618-498e-8847-2d620e286838
2011-01-14 20:22:23 +00:00
psychon
577a097e32 Keep a list of web sessions per IP address
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2261 726aef4b-f618-498e-8847-2d620e286838
2011-01-14 20:22:02 +00:00
psychon
b9b0fd4c87 Oh, shiny... NOT
(Yes, it's that time of the year again)

Signed-off-by: Uli Schlachter <psychon@znc.in>

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2260 726aef4b-f618-498e-8847-2d620e286838
2011-01-14 17:03:24 +00:00
psychon
5ff2fce9d9 Remove some code duplication in TCacheMap
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2259 726aef4b-f618-498e-8847-2d620e286838
2011-01-08 22:07:36 +00:00