Commit Graph

4514 Commits

Author SHA1 Message Date
prozacx
c549df9641 Moved CSocket to Socket.cpp/h
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1733 726aef4b-f618-498e-8847-2d620e286838
2010-02-05 02:01:00 +00:00
psychon
7c6e5bb86d CUtils::GenerateCert(): Set the issuer name
This hopefully fixes sf.net#2855717.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1732 726aef4b-f618-498e-8847-2d620e286838
2010-02-03 17:37:10 +00:00
psychon
4fe56b2472 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
psychon
c46616376a Call OnChanAction() after OnChanCTCP()
Now these two module hooks are called in the same order as OnPrivAction() and
OnPrivCTCP().

Additionally, one can now properly block channel action's from reaching the
channel buffer via return HALTCORE; in OnChanAction.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1730 726aef4b-f618-498e-8847-2d620e286838
2010-02-03 14:46:57 +00:00
cflakes
2594111e75 Added a summary line to LISTCHANS output. Suggested by bigpresh, basic patch by Efreak. Thanks!
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1729 726aef4b-f618-498e-8847-2d620e286838
2010-02-02 17:36:18 +00:00
psychon
596fb7aec4 Don't request the MOTD if there is none
If a new client logs in and we don't have a MOTD cached, we request it via
/motd. Since the IRC server sends it to use on connect anyway, there is no point
in requesting it if there is none. (And even if there is no MOTD, we should get
a "422 MOTD File is missing" which would be cached, so still no empty MOTD
buffer)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1728 726aef4b-f618-498e-8847-2d620e286838
2010-02-01 19:46:26 +00:00
psychon
c7546c0c05 Update to latest Csocket
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1727 726aef4b-f618-498e-8847-2d620e286838
2010-01-28 19:55:23 +00:00
psychon
e87f440d1c CClient::PutIRC(): Use CUser::PutIRC()
This won't save the world, but it won't destroy it either. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1726 726aef4b-f618-498e-8847-2d620e286838
2010-01-28 19:46:06 +00:00
psychon
f99e5190cd CClient: Use CUser's IRC Socket pointer
CUser already saves the pointer to the IRC socket, so why would CClient's have
to do the same?


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1725 726aef4b-f618-498e-8847-2d620e286838
2010-01-28 19:44:37 +00:00
psychon
b50d944bb9 Use GetIRCSock() instead of m_pIRCSock directly
This patch makes the code in CClient use a wrapper function for accessing the
IRC socket. Wait and see for why I do this. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1724 726aef4b-f618-498e-8847-2d620e286838
2010-01-28 19:40:38 +00:00
psychon
f24b1bb890 Remove a pointless if
If there is no connection to the IRC server, we can't forward a nick change
anyway, so there is no need to check for this case.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1723 726aef4b-f618-498e-8847-2d620e286838
2010-01-28 19:29:24 +00:00
cflakes
f06d68a77c 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
cb0cc03e2e 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
286722eda5 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
ceaa6234f0 Fix[1] HTTP Cache-Control headers for static files served by webadmin.
[1] http://www.mnot.net/cache_docs/#CACHE-CONTROL


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1719 726aef4b-f618-498e-8847-2d620e286838
2010-01-24 16:05:21 +00:00
psychon
ae29c50eb4 Add some more doxygen comments
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1718 726aef4b-f618-498e-8847-2d620e286838
2010-01-23 13:01:00 +00:00
cflakes
0212052cdb 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
44661c2d31 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
278e8e9464 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
5352cb3ded 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
ebbc126b72 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
ca1e8d43c3 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
130805ae95 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
e566a53585 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
f1515361fd 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
5ea1f8cc05 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
25ef34398d 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
207478d38b 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
6b07726e9b 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
1b51f15d47 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
d3a0a62f37 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
752f19c96b 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
e9e985e784 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
1d413819d3 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
ec581a6317 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
543bc51f00 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
fdb16bb170 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
72b782d93e 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
5ee25287dd 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
20f3ad920e 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
07d7477dec 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
367fb49734 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
12ce7f1c74 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
44fb494d66 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
985c096f6f 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
890c84af38 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
0f2a3b089b 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
5c28adf4ce 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
c97370c7e0 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
e944c857ec 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