From db69e18e066ffdc84afeb4e37d55f4205694f725 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 14 Feb 2005 15:28:13 +0000 Subject: [PATCH] - Fixed a bug where shuns placed on IP's did not take effect to currently connected users. - Fixed a small doc bug regarding shun in spamfilter, reported by KnuX (#0002338). --- Changes | 2 ++ doc/unreal32docs.html | 16 ++++++++-------- src/s_kline.c | 16 +++++----------- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/Changes b/Changes index d941726e3..781703ed0 100644 --- a/Changes +++ b/Changes @@ -603,3 +603,5 @@ to a default of logging errors to ircd.log. Suggested by w00t (#0002327). - Fixed shuns not working as target in spamfilter and ban version { }, reported by Bugz (#0002223). +- Fixed a bug where shuns placed on IP's did not take effect to currently connected users. +- Fixed a small doc bug regarding shun in spamfilter, reported by KnuX (#0002338). diff --git a/doc/unreal32docs.html b/doc/unreal32docs.html index 3d36b7258..a4e0b0b73 100644 --- a/doc/unreal32docs.html +++ b/doc/unreal32docs.html @@ -27,7 +27,7 @@ English | German |
UnrealIRCd
http://www.unrealircd.com
Version: 3.2.2-CVS
- Last doc update: 2005-01-29
+ Last doc update: 2005-02-13
Head Coders: Stskeeps / codemastr / Syzop / Luke
Contributors: McSkaf / Zogg / NiQuiL / assyrian / chasm / DrBin / llthangel / Griever / nighthawk
@@ -510,9 +510,9 @@ Modules can also add other extended ban types.
viruschanpart all channels, join set::spamfilter::virus-help-channel, disables all commands except PONG, ADMIN, and msg/notices to set::spamfilter::virus-help-channel - [tkltime] The duration of the *line added by the filter, use '-' to use the default or to skip + [tkltime] The duration of the *line/shun added by the filter, use '-' to use the default or to skip (eg: if action = 'block') - [reason] Block or *line reason.. you CANNOT use spaces in this, but underscores ('_') will be translated + [reason] Block/*line/shun reason.. you CANNOT use spaces in this, but underscores ('_') will be translated into spaces at runtime. And double underscore ('__') gets an underscore ('_'). Again, use '-' to use the default reason. [regex] this is the actual regex or 'bad word' where we should block on and perform the action at @@ -541,8 +541,8 @@ into spaces at runtime. And double underscore ('__') gets an underscore ('_'). A action block; };

-

set::spamfilter::ban-time allows you to modify the default ban time for *lines added by spamfilter (default: 1 day)
- set::spamfilter::ban-reason allows you to specify a default reason for the *lines (default: 'Spam/advertising')
+

set::spamfilter::ban-time allows you to modify the default ban time for *lines/shuns added by spamfilter (default: 1 day)
+ set::spamfilter::ban-reason allows you to specify a default reason (default: 'Spam/advertising')
set::spamfilter::virus-help-channel allows you to specify the channel to join for action 'viruschan' (default: #help)
set::spamfilter::virus-help-channel-deny allows you to block any normal joins to virus-help-channel (default: no)

@@ -2008,7 +2008,7 @@ spamfilter { target specifies the targets, see here for a list of possible types (eg: 'channel').
action specifies the action to be taken, see here for a list of possible actions (eg: 'gline').
reason optional: specifies the ban or block reason, else the default is used.
- ban-time optional: specifies the duration of a *line ban, else the default is used (1 day).
+ ban-time optional: specifies the duration of a *line ban or shun, else the default is used (1 day).

Examples:
@@ -2294,9 +2294,9 @@ set { If you specify an 'action' like zline/gline/etc in ban version, then you can specify here how long the ip should be banned, the default is 86400 (1 day).

set::spamfilter::ban-time <value>
- Same as above but for *lines added by spamfilter

+ Same as above but for *lines/shuns added by spamfilter

set::spamfilter::ban-reason <reason>
- Reason to be used for *lines added by spamfilter

+ Reason to be used for entries added by spamfilter

set::spamfilter::virus-help-channel <channel>
The channel to use for the 'viruschan' action in spamfilter

set::spamfilter::virus-help-channel-deny <yes|no>
diff --git a/src/s_kline.c b/src/s_kline.c index 3afdcd924..18f6ef097 100644 --- a/src/s_kline.c +++ b/src/s_kline.c @@ -232,21 +232,15 @@ aClient *acptr; cip = GetIP(acptr); - if (!(*tmp->hostmask < '0') && (*tmp->hostmask > '9')) + if ((*tmp->hostmask >= '0') && (*tmp->hostmask <= '9')) is_ip = 1; else is_ip = 0; - if (is_ip == - 0 ? (!match(tmp->hostmask, - chost) - && !match(tmp->usermask, - cname)) : (!match(tmp-> - hostmask, chost) - || !match(tmp->hostmask, - cip)) - && !match(tmp->usermask, - cname)) + if (is_ip == 0 ? + (!match(tmp->hostmask, chost) && !match(tmp->usermask, cname)) : + (!match(tmp->hostmask, chost) || !match(tmp->hostmask, cip)) + && !match(tmp->usermask, cname)) { ClearShunned(acptr); #ifdef SHUN_NOTICES