Commit Graph

73 Commits

Author SHA1 Message Date
Uli Schlachter
6ed10a1cf4 autocycle: Only cycle once in 15 seconds
This should stop all fights against ChanServ. Please note that nothing will
happen if we are the only one in the channel after 15 secs since this module
only checks if it needs to do something when someone leaves a channel.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-04 21:00:06 +02:00
Alexey Sokolov
78859672e7 Move autocycle module to extra.
Modern/decent networks have services anyway, and for registered channels
this module is useless. Also it tends to fight ChanServ in case if
ChanServ joins/parts the channel to remove ops.

Users of deprecated ne^W^Wnetworks without services can use it from extra.
2011-09-05 00:51:09 +07:00
Kyle Fuller
98777a27af Allow loading the log module as either user, network or global 2011-08-27 17:06:47 +00:00
Kyle Fuller
0b1627c529 Make all the modules support networks 2011-08-24 19:07:32 +01:00
Uli Schlachter
80c76c97a6 Remove GLOBALMODCONSTRUCTOR
MODCONSTRUCTOR does that job just fine (now).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-21 18:01:58 +02:00
Kyle Fuller
c456d20b21 Merge CGlobalModule(s) into CModule(s) 2011-08-21 13:34:22 +01:00
Kyle Fuller
e86ff3219d Fix module data for extra/ modules for real 2011-08-05 22:16:21 +01:00
Un1matr1x
708366d9ae remove some more of the evil trailing white spaces & tabs 2011-06-09 21:29:13 +02:00
Un1matr1x
d77298545e tabs in newlines could be removed² 2011-06-08 06:51:13 +02:00
Brian
3a16fe54c1 Redo commands for send_raw modules. Also, use the new CModCommand stuff. 2011-06-07 23:31:24 +01:00
Kyle Fuller
c635caeab2 Use the module save path for dcc's, and remove DLPath since it is no longer used. 2011-06-01 20:21:27 +01:00
Kyle Fuller
16047eaf81 Move dcc file transfers to their own module 2011-06-01 20:21:27 +01:00
Kyle Fuller
0b360c0102 Remove OnDCCUserSend module hook 2011-06-01 20:21:27 +01:00
Uli Schlachter
4324d5ff02 Merge branch 'master' of https://github.com/pfn/znc
Conflicts:
	modules/extra/away.cpp

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-21 13:58:41 +02:00
Alexey Sokolov
5ece00f168 Don't confuse people with away module. 2011-04-25 09:44:52 +07:00
Alexey Sokolov
37e6bbd6ae Allow log module to get no arguments.
This was broken since znc-0.098-17-g64e565c (563bce5987)
which introduced possibility of log module to specify wanted path as argument.

Thanks to turnor for reporting this.
2011-04-21 10:02:15 +07:00
Kyle Fuller
ea5ec8496c Remove a pointless status command provided by the shell module 2011-04-04 16:57:44 +01:00
Uli Schlachter
3f24f28736 Stop including FileUtils.h in any header
This causes every piece of code which wants to use CFile or CDir to have to
include FileUtils.h. This causes quite some noise.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-03 11:50:44 +02:00
Uli Schlachter
1761fe71e4 Move CExecSock to ExecSock.h
As a result, Utils.h no longer has to include Socket.h and lots of stuff breaks.

Due to a severe case of lazyness, some of the code for CExecSock is still in
Utils.cpp. Feel free to fix if you really have to.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-03 11:50:41 +02:00
MentalFS
563bce5987 Load parameter for log module's path 2011-02-26 12:21:57 +01:00
Uli Schlachter
8eda266bae Fix shell module
shell didn't compile since 6bc36d1708 because it used the
three-argument-version of CModule::PutModule(). This commit replaced that with a
call to CModule::PutUser().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-22 23:36:54 +01:00
Uli Schlachter
4acadb3cdf Evil trailing whitespace is evil!
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-22 21:03:45 +01:00
Kyle Fuller
a93a586f53 Show a list of users in the send_raw web interface 2011-02-22 16:06:43 +00:00
Kyle Fuller
d8b181718c send_raw: Add a web interface 2011-02-22 15:14:34 +00: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
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
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
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
44d2816379 Remove some more pointless checks for sPageName.empty()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2241 726aef4b-f618-498e-8847-2d620e286838
2011-01-02 16:33:42 +00:00
darthgandalf
a0c0b73590 Add new parameter to OnPart module hook: part message.
Sorry for API change :)

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2215 726aef4b-f618-498e-8847-2d620e286838
2010-12-30 11:28:41 +00:00
psychon
50b57be5af listsockets: Ignore dereferenced sockets
When someone connects to ZNC, this connection is first handled by an instance of
CIncomingConnection. Once we determined if this is a HTTP or an IRC connection,
the connection is handed of to the appropriate class.

The CIncomingConnection instance that was used first will still linger around
for the next event loop iteration and then be destroyed. Since this socket isn't
a "real" connection anymore (another instance of Csock took over for this one),
listsockets should ignore all sockets in state CLT_DEREFERENCE.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2213 726aef4b-f618-498e-8847-2d620e286838
2010-12-24 22:06:13 +00:00
psychon
144cdf256b Add a web interface to listsockets
Thanks to kylef for the patch and again sorry for svn. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2212 726aef4b-f618-498e-8847-2d620e286838
2010-12-24 21:56:35 +00:00
psychon
f6935557ce Refactor listsockets, move the logic to get a string for each column into its own function
Patch by kylef and submitted via git. Sorry that we are using subversion and
that subversion is bad at tracking this kind of authorship. :(


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2211 726aef4b-f618-498e-8847-2d620e286838
2010-12-24 21:29:06 +00:00
psychon
f15aef4807 Remove some semicolon that -pedantic didn't like
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2178 726aef4b-f618-498e-8847-2d620e286838
2010-11-07 16:14:13 +00:00
psychon
5e070e7881 Turn CChan::m_msNicks into a map<CString, CNick>
Saving a pointer in a map seems like a bad idea and means we have to delete all
the contained stuff by hand when the channel is destroyed. This requires us to
loop through the channel which is slow. A map is meant as a container, so use it
as one and directly save the stuff we want it to save in there.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2175 726aef4b-f618-498e-8847-2d620e286838
2010-11-06 19:41:40 +00:00
psychon
8e7ac59d25 clearbufferonmsg: Skip detached chans
Since the user can't read detached channels, there is no point in clearing their
buffer. Let's leave them alone instead.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2151 726aef4b-f618-498e-8847-2d620e286838
2010-09-28 08:10:43 +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
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
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
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
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
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
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
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
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
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
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
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
psychon
92cce35f90 Move discon_kick, blockuser and lastseen out of extra/
discon_kick is renamed to disconkick, seems more consistent with the other
modules.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1923 726aef4b-f618-498e-8847-2d620e286838
2010-04-15 15:52:50 +00:00