Commit Graph

571 Commits

Author SHA1 Message Date
psychon c0665b1967 Revert r1738-1742
This broke webadmin, changed CString::Token()'s behavior possibly breaking a lot
of stuff just before a release and added an unused config entry.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1748 726aef4b-f618-498e-8847-2d620e286838
2010-02-08 13:49:44 +00:00
cflakes d31aaa6d2d AppendTimestamp, PreprendTimestamp, DCCVHost and DenySetVHost (also affects DCCVHost) are now also changable via the admin module. Basic patch by psychon!
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1747 726aef4b-f618-498e-8847-2d620e286838
2010-02-07 18:21:48 +00:00
cflakes a4604311a2 Removed an unnecessary exclamation mark from the admin module.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1746 726aef4b-f618-498e-8847-2d620e286838
2010-02-07 18:02:32 +00:00
cflakes c7c2039948 Added support for changing the "IsAdmin" flag to the admin module.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1745 726aef4b-f618-498e-8847-2d620e286838
2010-02-07 18:01:42 +00:00
cflakes 8b80dc72c5 Added support for the MaxJoins and JoinTries variables to the admin module.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1744 726aef4b-f618-498e-8847-2d620e286838
2010-02-07 17:52:42 +00:00
cflakes d1b241a981 Added missing IsAdmin checks to the admin module. DenyLoadMod and DenySetVHost are now properly adhered to.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1743 726aef4b-f618-498e-8847-2d620e286838
2010-02-07 17:45:20 +00:00
prozacx 8fad25705f Fixed a bug introduced in r1740 where template files weren't being found
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1741 726aef4b-f618-498e-8847-2d620e286838
2010-02-07 04:53:06 +00:00
psychon 2f10f8ef5c partyline: Send the user list on forced rejoin
When a client tries to part from a channel to which it was fixed, we sent it a
join again to make it rejoin (bad irssi for not waiting for the server's reply
to PART!).

The problem here was that we didn't send the nicklist and thus the channel
appeared empty. This fixes SF.net #2802684.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1731 726aef4b-f618-498e-8847-2d620e286838
2010-02-03 16:47:48 +00:00
cflakes 05aad59935 Removed default-checked yet quite useless and annoying "[add ]your current ip" checkbox from webadmin's edit user page. The new default skin never had it, this completely removes it from the other skins and from the module.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1722 726aef4b-f618-498e-8847-2d620e286838
2010-01-25 21:54:55 +00:00
cflakes 09b7cbfee0 Use a nice, non-serif font for the "ice" webadmin skin instead of the browser default font (which usually is Times New Roman or something)!
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1721 726aef4b-f618-498e-8847-2d620e286838
2010-01-24 17:50:32 +00:00
cflakes 188cde8195 Revamped default webadmin skin. It's very grayish, but looks way more like 2010 than the old default skin does.
The blue favicon.ico has been copied from the other webadmin skins.
Here's a screenshot: http://img402.imageshack.us/img402/2452/zncsettings126435334747.png


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1720 726aef4b-f618-498e-8847-2d620e286838
2010-01-24 17:19:07 +00:00
cflakes b3f4ade6de Update to the flooddetach module: fixing a compile warning on x86 as reported by SilverLeo. Thanks!
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1717 726aef4b-f618-498e-8847-2d620e286838
2010-01-19 20:10:15 +00:00
cflakes 911e778357 Following the bug report at [1] and a short discussion on IRC, this changes webadmin HTML pages' default charset to UTF-8. Since we do not have a routine that detects an input's charset or even converts it to UTF-8, this will cause ISO-8859-1(1) or other non UTF-8 encoded inputs that have been set e.g. as module arguments from IRC or from a non-UTF-8 shell console to show up garbled in webadmin. A possible fix would be to convert strings to UTF-8 before inserting them into the templates. We'll see what the future holds.
[1] http://sourceforge.net/tracker/index.php?func=detail&aid=2933280&group_id=115828&atid=672821


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1716 726aef4b-f618-498e-8847-2d620e286838
2010-01-18 19:52:16 +00:00
psychon 100af31cd7 Remove svn:executable from modules/q.cpp
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1703 726aef4b-f618-498e-8847-2d620e286838
2010-01-10 13:15:13 +00:00
cflakes e43fbc1712 Importing the flooddetach module into the extra package. Psychon once wrote it for me.
It detaches you from a chan if more than A messages are sent in B seconds, where
A is 5 and B is 2 by default. You can change the numbers via the module's arguments
or from IRC. The module will try to automatically re-attach you when the flood is over.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1701 726aef4b-f618-498e-8847-2d620e286838
2010-01-10 12:04:08 +00:00
cflakes b404fae21b Importing the block_motd module into the extra module package. Psychon is probably its author since I grabbed it from here: http://people.znc.in/~psychon/znc/modules/, so thanks psychon! :>
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1700 726aef4b-f618-498e-8847-2d620e286838
2010-01-10 11:57:54 +00:00
cflakes d35fdb4b3d Small update to extra/notify_connect:
- Added a proper description
- Fixed bracing style
- Removed unneeded headers
- Added client IP addresses to info messages.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1699 726aef4b-f618-498e-8847-2d620e286838
2010-01-10 11:52:47 +00:00
cflakes 4b9cc16cc3 Replaced the "Another client authenticated as your user, use the 'ListClients' command to see all clients" message with a configurable module ("clientnotify").
This means that you can now:
- turn off the message (it's even off by default until you load the module)
- have the message sent to you as a notice instead of a privmsg
- restrict messages to previously unseen client ip addresses only (no more spam on sucky connections)
- be notified of disconnecting clients if you want to.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1698 726aef4b-f618-498e-8847-2d620e286838
2010-01-10 11:47:56 +00:00
cflakes 44e8a0ef42 Overhaul for the send_raw module in extra. Mostly done by zynox, big thanks for that.
Changes in detail:
- send_raw is now a user module. It can only be loaded by admin users.
- by prepending "in" or "out" to the /msg *send_raw command, e.g.
/msg *send_raw testuser in :znc!znc@znc PRIVMSG #chan :Hello dude, only you can see this (znc user=testuser!)
you can now also send raw IRC lines to the connected clients instead of just to the IRC server.
- Fixed a spelling mistake.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1697 726aef4b-f618-498e-8847-2d620e286838
2010-01-09 23:27:34 +00:00
silverleo 3ae8d389c6 It's 2010, where's my hoverboard?
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1693 726aef4b-f618-498e-8847-2d620e286838
2010-01-06 09:37:05 +00:00
imaginos 34571a0c89 couple of additional tweaks, namely missing the last check on getpass
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1692 726aef4b-f618-498e-8847-2d620e286838
2010-01-06 05:37:35 +00:00
imaginos ce1a2cafba fix savebuff so its actually reading from disk again on first load. there appeared to be a change where the channels were not loaded before savebuff, so removed that timing dependancy. Also added lame default password to save onload failure. Finally removed the event emulation since I see there is buffextras module, and now savebuff is doing only what it should be doing ... saving the buffer to disk
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1691 726aef4b-f618-498e-8847-2d620e286838
2010-01-06 05:21:51 +00:00
silverleo 2de77971c4 Always null the interp var on load to prevent a possible crash on unload.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1685 726aef4b-f618-498e-8847-2d620e286838
2009-12-19 21:43:33 +00:00
silverleo d55e5acbca Only allow admins to load the modtcl module
The exception to this is if ZNC is compiled with -DMOD_MODTCL_ALLOW_EVERYONE
DGandalf wanted this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1684 726aef4b-f618-498e-8847-2d620e286838
2009-12-19 19:15:07 +00:00
psychon 434ddb9f35 Minor spelling fix in partyline
Thanks to the-me for noticing this and sending a patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1682 726aef4b-f618-498e-8847-2d620e286838
2009-12-19 16:18:27 +00:00
psychon 540f867f9b Always prepend 'away :' to *all* away messages, not just the autoaway message.
Consequence of *not* doing this - The following command will unexpectedly cause
ZNC to disconnect from your IRC server:
 /query *away away quit

Thanks to Jim Ramsay <i.am@jimramsay.com> for finding this and providing a patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1672 726aef4b-f618-498e-8847-2d620e286838
2009-12-02 18:16:19 +00:00
psychon 8114f27a5d Fix a crash bug with auth modules
If a module like imapauth needs some time to process a login, it's possible that
the client already disconnected by the time the lookup finished. This would then
cause a stale pointer in CAuthBase to be dereferenced.

Fix this remotely exploitable crash bug by adding a new function
CAuthBase::Invalidate(). After this was called, the CAuthBase instance doesn't
do anything at all anymore, especially not dereferencing the (possibly stale)
m_pSock pointer.

This also makes sure that one can only call AcceptLogin() or RefuseLogin() once.

Thanks to Sm0ke0ut for providing backtraces and reporting this bug.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1669 726aef4b-f618-498e-8847-2d620e286838
2009-11-28 18:53:20 +00:00
psychon f2df100cc9 route_replies: Improve the timeout handling
One can now disable the timeout messages with '/msg *route_replies silent yes'
and the message shown on timeout sounds less grave.

It would be best if we could fix all of the timeout bugs, but most of the
reports we got lately sound like they were caused by cosmic rays or something...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1660 726aef4b-f618-498e-8847-2d620e286838
2009-11-15 13:03:48 +00:00
psychon 91962e32fc route_replies: Increase the timeout
Instead of generating a "this module hit a BUG" after 20s this module now waits
60s for a reply. This should cause less "wrong" bug reports for us.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1657 726aef4b-f618-498e-8847-2d620e286838
2009-11-13 21:35:24 +00:00
psychon 007754cf6d admin: Disable ConnectEnabled() for cloned users
If you know clone a user through admin's clone command, that user won't connect
to irc. When the new user first logs in he will be told to use '/msg *status
connect'.

Thanks to BLG and KiNgMaR for the idea and the 'patch'.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1653 726aef4b-f618-498e-8847-2d620e286838
2009-10-20 16:59:40 +00:00
psychon e0e935cd93 Remove connect_throttle module from extra
fail2ban does the job much better (and is based on connect_throttle btw).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1649 726aef4b-f618-498e-8847-2d620e286838
2009-10-15 14:38:02 +00:00
psychon eb935da142 blockuser: Add a missing admin check
Non-admin users should not be able to block any users. Really, they shouldn't.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1648 726aef4b-f618-498e-8847-2d620e286838
2009-10-11 12:58:48 +00:00
psychon 9dd3883164 Use a set instead of a vector in CModule
CModule has two vectors: A list of timers and a list of sockets for this
module. Since one shouldn't be able to add items multiple times it makes sense
to use a set here instead.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1643 726aef4b-f618-498e-8847-2d620e286838
2009-10-05 20:44:54 +00:00
sebastinas fdb9f6ce01 admin: Fix the output of "help".
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1633 726aef4b-f618-498e-8847-2d620e286838
2009-09-24 10:24:17 +00:00
psychon 2ecfbf940b admin: Fix the help for "setchan"
Thanks to flakes.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1632 726aef4b-f618-498e-8847-2d620e286838
2009-09-24 10:20:23 +00:00
psychon 1ac094fbb6 Fix some minor errors in webadmin's CSS files
Thanks to everyone who reported this and helped testing.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1631 726aef4b-f618-498e-8847-2d620e286838
2009-09-18 18:26:20 +00:00
psychon 0ba3b52174 Move saslauth into modules/extra/
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1626 726aef4b-f618-498e-8847-2d620e286838
2009-09-14 12:17:17 +00:00
psychon da081370c0 webadmin: Be able to add new admin users with shell module loaded
webadmin loaded a user's modules before it set its admin flag - fix this by
changing the order.

webadmin failed at setting a new user's admin flag. This is fixed too.

Thanks to DarthGandalf for reporting this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1625 726aef4b-f618-498e-8847-2d620e286838
2009-09-11 12:46:40 +00:00
psychon af5f7a1489 Remove an unnecessary include from modules/Makefile
All dependency files are creates in .depend, there is no .depend/extra subdir.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1619 726aef4b-f618-498e-8847-2d620e286838
2009-09-08 20:44:12 +00:00
psychon 1430cd3659 Add sha256 support
This imports the sha256 code from http://www.ouah.org/ogay/sha2/ (The other
hashes from sha-2 were removed). sha256 is a much stronger hashing algorithm
than md5 is (There were successful birthday attacks against md5).

All the code now defaults to creating sha256 salted hashes (The salting used is
the same as before).

Old znc.conf files can still be read.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1618 726aef4b-f618-498e-8847-2d620e286838
2009-09-07 18:55:07 +00:00
psychon 570946624c webadmin: Increase buffer on HTTP sockets on the irc port
When webadmin "grabs" HTTP connections from the IRC port, it moves the
underlying connection to its own socket class and copies all of the settings
from the old socket to this new one.

One of the properties that is copied is the MaxBufferThreshold which is 1024 for
IRC sockets, but which should be 10240 webadmin sockets (CSocket::CSocket()).
This could theoretically cause bugs like the "blank page in firefox" reported by
kaiz0ku.

Anyway, this is hopefully fixed by setting the 10k MaxBufferThreshold again.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1617 726aef4b-f618-498e-8847-2d620e286838
2009-09-07 18:33:02 +00:00
psychon 7dfa081daa savebuff: Honour the KeepBuffer setting
Before this, savebuff also added messages if a client was connected and a
channel had KeepBuffer = false which is obviously wrong.

Thanks to _marix for reporting this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1616 726aef4b-f618-498e-8847-2d620e286838
2009-09-04 12:25:05 +00:00
psychon 4415e53001 route_replies: Handle 401 for /names
Thanks to Kuja for reporting that route_replies doesn't handle the "no such
nick/channel" numeric.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1614 726aef4b-f618-498e-8847-2d620e286838
2009-09-02 17:22:34 +00:00
psychon 7f182a9bbb Move CZNC::FindModPath() to CModules
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1611 726aef4b-f618-498e-8847-2d620e286838
2009-08-23 11:05:22 +00:00
psychon c92cea6b87 Fix out-of-tree builds
Instead of using sed to strip away the source dir this now uses make's notdir.
$(notdir this/is/an/example) results in example.

This also moved the generated dependency files from .depend/extra into .depend/

Since we need the extra/ path prefix for the modules from modules/extra, that
one is added back via addprefix.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1610 726aef4b-f618-498e-8847-2d620e286838
2009-08-22 16:03:51 +00:00
psychon 6bdd7b0feb Import SilverLeo's modtcl from znc-extra
The configure and Makefile stuff was taken from there, too. By default modtcl is
disabled, use --enable-extra --enable-tcl to get it.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1609 726aef4b-f618-498e-8847-2d620e286838
2009-08-22 15:45:32 +00:00
psychon 49b48b05b1 Whoops fix a minor makefile dependency error
modules/Makefile didn't include the dependency information for modules/extra/*


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1608 726aef4b-f618-498e-8847-2d620e286838
2009-08-20 21:12:44 +00:00
psychon fc4c3b974b Import most of znc-extra
This imports all modules from znc-extra except modtcl under modules/extra.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1606 726aef4b-f618-498e-8847-2d620e286838
2009-08-20 19:54:27 +00:00
psychon a593f584c0 Add support for extra modules
This commits adds the necessary build system fun for extra modules in
modules/extra which can be enabled with --enable-extra.

This is a preparation for the import of znc-extra.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1605 726aef4b-f618-498e-8847-2d620e286838
2009-08-20 19:49:21 +00:00
psychon 6db23367be route_replies: Don't route 250
/lusers can cause a 250 "Highest connection count" reply, but sadly some IRC
daemons don't send this numeric. Since there is no easy way to handle this, we
will just assume that 266 is the last numeric reply to /lusers.

*If* there is a 250 reply, it will be broadcasted to all connected clients. This
is still better than the "This module hit a timeout" we generate on some ircds
currently.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1600 726aef4b-f618-498e-8847-2d620e286838
2009-08-17 18:01:59 +00:00