Commit Graph

1697 Commits

Author SHA1 Message Date
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 202029d51f Add some doxygen comments
This adds doxygen comments to the most important functions from
CModule and CGlobalModule.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1715 726aef4b-f618-498e-8847-2d620e286838
2010-01-17 12:25:17 +00:00
psychon 6aad406387 Use RTLD_GLOBAL for opening modules
This fixes a bug where perl (loaded from modperl) tried to load some perl module
which tied with a symbol lookup error since perl's symbols were private. This
also adds a rather long comment explaining why we use the RTLD_-flags we do use.

Thanks to tylerdu for finding this, reporting it and testing the fix.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1714 726aef4b-f618-498e-8847-2d620e286838
2010-01-15 22:49:17 +00:00
imaginos 1acbdd5b91 cleanup some, and aggregate common code
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1713 726aef4b-f618-498e-8847-2d620e286838
2010-01-15 20:19:02 +00:00
imaginos baeb2a666e added workaround for a canonical name that points to ipv6 and ipv4 ip's, the ipv6 ip is tried first, followed up by a final try on ipv4 in the event the ipv6 connect results in a network unreachable. I wonder what this will break ...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1712 726aef4b-f618-498e-8847-2d620e286838
2010-01-15 19:45:58 +00:00
cflakes 4aaa804bea Added a Clone() method to CNick:
void Clone(const CNick& SourceNick);

Patch by KiNgMaR, thanks!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1711 726aef4b-f618-498e-8847-2d620e286838
2010-01-14 11:16:48 +00:00
imaginos 443c523d1d cleanup some crosseyed code
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1710 726aef4b-f618-498e-8847-2d620e286838
2010-01-12 20:46:52 +00:00
imaginos 800cb23e2a added workaround for older c-ares version, implemented library init calls per KiNgMaR
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1709 726aef4b-f618-498e-8847-2d620e286838
2010-01-12 20:05:58 +00:00
imaginos c9c773ef66 bring csocket changes up to date with win32 fixes provided by DGandalf, also forgot to implement ares_timeout
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1708 726aef4b-f618-498e-8847-2d620e286838
2010-01-12 18:51:31 +00:00
cflakes 5035ec4a72 Update to latest Csocket. A Thank You goes out to DGandalf for noticing a bug in Csocket's c-ares code and another one of course to Imaginos for promptly looking into and fixing this.
The issue was that a timeout was being applied when c-ares really takes care of timeouts.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1707 726aef4b-f618-498e-8847-2d620e286838
2010-01-12 00:28:24 +00:00
cflakes 68754d2781 Update to the makeconf procedure... We now only ask for 9 common modules, instead of for all 20 or 30.
This will keep people from loading the sample or saslauth (or away) modules and thereby avoid stupid questions.

Instead of listing and asking for all modules, we only show the most widely used ones plus "And X other (uncommon) modules. You can enable those later.".

To add a module, append its name to the array in CZNC::FilterUncommonModules().


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1706 726aef4b-f618-498e-8847-2d620e286838
2010-01-11 12:49:00 +00:00
silverleo c6b3e2507c Partly revert r1702 and introduce a new setting ServerThrottle.
ServerThrottle determines how long znc waits before it tries to connect to the same server again.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1705 726aef4b-f618-498e-8847-2d620e286838
2010-01-10 18:50:39 +00:00
psychon fc77edef08 Switch to Csocket's c-ares code
This removes all of znc's c-ares code and instead enables Csocket's built-in
version. That code is newer than ZNC's, but should hopefully work just as good.
Let's wait for the bug reports....


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1704 726aef4b-f618-498e-8847-2d620e286838
2010-01-10 13:20:20 +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
silverleo 3ef2b20e87 Change ConnectDelay to be server specific and not global.
This way users that connect to different servers can connect faster.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1702 726aef4b-f618-498e-8847-2d620e286838
2010-01-10 12:32:34 +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
psychon 980b79e30f Move all of Timers.h into User.cpp
Timers.h only contained CUserTimer and that one is only used in CUser.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1696 726aef4b-f618-498e-8847-2d620e286838
2010-01-08 16:32:27 +00:00
psychon 74ae59a12f Use znc-config to get --modlink in znc-buildmod
This fixes znc-buildmod on Mac OS.

Thanks to zynox for this patch and some other znc-related work!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1695 726aef4b-f618-498e-8847-2d620e286838
2010-01-07 20:51:12 +00:00
cflakes 75cf92428f Some random clean-up in CFile::Delete. My first commit. Yay!
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1694 726aef4b-f618-498e-8847-2d620e286838
2010-01-07 19:29: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
psychon bea5ed53cb Remove the check for the include dir in znc-buildmod
znc-config --include was removed in r1251 from Oct 2008. Ever since this check
was broken and no one noticed. I guess this means no one needs this check... ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1690 726aef4b-f618-498e-8847-2d620e286838
2010-01-05 21:35:16 +00:00
psychon 00e7a502a6 znc-buildmod: Don't choke on spaces
In shell scripts you always have to be careful about spaces. Better at some ""
too much than one too few. Now spaces in the pathname for the module and spaces
in some other paths should work correctly.

Thanks to Nirjen for noticing this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1689 726aef4b-f618-498e-8847-2d620e286838
2010-01-05 21:23:58 +00:00
psychon 521917efdb znc-buildmod: Work on cygwin
On windows/cygwin we have to use a libznc.dll because window's linker works
differently than everyone else's. With this commit znc-buildmod links in
libznc.dll which makes it work!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1688 726aef4b-f618-498e-8847-2d620e286838
2010-01-05 21:20:53 +00:00
psychon 416cd2cfe8 Query buffer: Include /me's
Before, the query buffer did include regular channel messages, but CTCP ACTIONs
were just discarded. This is now fixed.

Thanks to jarryd for finding and reporting this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1687 726aef4b-f618-498e-8847-2d620e286838
2010-01-02 13:02:33 +00:00
psychon a373ad10c0 User: Have correct save and dl path after Clone()
Without this, after you cloned a user via e.g. the admin modul, it would still
write to the datadir of the old user.

Patch by flakes, thanks a lot.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1686 726aef4b-f618-498e-8847-2d620e286838
2009-12-31 12:28:59 +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 2a053a3ee3 Update to latest Csocket
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1683 726aef4b-f618-498e-8847-2d620e286838
2009-12-19 16:29:26 +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 ca3a1f2da5 Before restarting ZNC, do a clean shutdown
That way e.g. the ISpoofFile's content is restored and the pid file deleted.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1681 726aef4b-f618-498e-8847-2d620e286838
2009-12-18 17:06:47 +00:00
psychon c5e7913ed6 Don't try to catch SIGILL, SIGBUS or SIGSEGV
The signal handler didn't really do anything useful for these signals and if znc
gets one of these signals, something is really fishy and we shouldn't even try
to do a clean shutdown.

The default behavior for these signals is now used instead which means you can
get core dumps.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1680 726aef4b-f618-498e-8847-2d620e286838
2009-12-18 17:04:50 +00:00
psychon ecbb1c57dd Restart the CConnectUserTimer after a rehash
That way new ConnectDelay settings are applied immediately, not after the timer
is restart next due to sth else.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1679 726aef4b-f618-498e-8847-2d620e286838
2009-12-18 16:59:28 +00:00
psychon 9e0ea22efe Increase the version number to 0.079
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1678 726aef4b-f618-498e-8847-2d620e286838
2009-12-18 16:09:35 +00:00
psychon ed4c836934 Increase the version number to to 0.078
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1676 726aef4b-f618-498e-8847-2d620e286838
znc-0.078
2009-12-18 16:06:15 +00:00
silverleo ad9bcdfbf9 Don't accept only spaces for a quitmsg. Otherwise we would end in an unrecoverable config error on startup.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1675 726aef4b-f618-498e-8847-2d620e286838
2009-12-15 18:50:47 +00:00
psychon 7ad7f2df14 Regenerate configure with newer autoconf
The small change to configure.in seems to be necessary to still get the output
we want. No idea what happened so that this changed.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1674 726aef4b-f618-498e-8847-2d620e286838
2009-12-11 15:18:00 +00:00
psychon 63d4456f59 Always use blocking DNS for resolving bind hosts
This fixes a bug where ZNC failed to bind to domain names if they weren't
mentioned in /etc/hosts.

Thanks to alturiak for finding and reporting this.
Thanks to Imaginos for finding a quick workaround.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1673 726aef4b-f618-498e-8847-2d620e286838
2009-12-10 21:29:47 +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 5a08b7b7d6 Really check the return value of strftime()
If strftime() returns 0, the buffer we passed to it shouldn't be touched at
all, because it's not guaranteed to be null-terminated.

Someone (*cough*) already tried to fix this in r1394, but failed badly.

Thanks to DarthGandalf for spotting this and providing a patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1671 726aef4b-f618-498e-8847-2d620e286838
2009-11-30 18:16:16 +00:00
psychon 0cde028bfb ISpoofFormat: Go through ExpandString()
ISpoofFormat now can be used with e.g. %user% which allows some kind of
poor-man's DenySetIdent (force ident to be user name).

For backward compatibility, if ExpandString() doesn't change the string we just
replace all "%" with the user's ident.

Thanks to DarthGandalf for the idea and the patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1670 726aef4b-f618-498e-8847-2d620e286838
2009-11-29 15:17:39 +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
silverleo e2aba7587b Revert a commit from r1527 that made some PONG replies pass through to the client.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1668 726aef4b-f618-498e-8847-2d620e286838
2009-11-24 13:06:25 +00:00
psychon e8c64c0df6 Document the signals
This adds the new SIGUSR1 handling to README and adds a section on SIGINT,
SIGHUP and SIGUSR1 to znc's man page.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1667 726aef4b-f618-498e-8847-2d620e286838
2009-11-20 16:42:44 +00:00