From db69e18e066ffdc84afeb4e37d55f4205694f725 Mon Sep 17 00:00:00 2001
From: Bram Matthys
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.
- viruschan part 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.
@@ -541,8 +541,8 @@ into spaces at runtime. And double underscore ('__') gets an underscore ('_'). A
action block;
};[regex] this is the actual regex or 'bad word' where we should block on and perform the action at
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)
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
set::spamfilter::ban-reason <reason>
- Reason to be used for *lines 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