diff options
| author | DukePyrolator <DukePyrolator@anope.org> | 2010-12-23 07:15:32 +0100 |
|---|---|---|
| committer | DukePyrolator <DukePyrolator@anope.org> | 2010-12-23 07:15:32 +0100 |
| commit | a0ad3c4fef7e35c68dee128950ef95c0c56849fe (patch) | |
| tree | a9096244ac74dc31d959e9b6426453de90c28d03 /src/regchannel.cpp | |
| parent | 184e7b3f64beb104e2d676048fc5bf485c5ad743 (diff) | |
| parent | 265006b69176e1d8130284c63bcb50a1b67a426f (diff) | |
Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'src/regchannel.cpp')
| -rw-r--r-- | src/regchannel.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 1932da4e8..62dc94b3d 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -748,7 +748,15 @@ bool ChannelInfo::CheckKick(User *user) { AutoKick *autokick = this->GetAkick(j); - if ((autokick->HasFlag(AK_ISNICK) && autokick->nc == nc) || (!autokick->HasFlag(AK_ISNICK) && match_usermask(autokick->mask, user))) + if (autokick->HasFlag(AK_ISNICK) && autokick->nc == nc) + do_kick = true; + else + { + Entry akick_mask(autokick->mask); + if (akick_mask.Matches(user)) + do_kick = true; + } + if (do_kick) { Log(LOG_DEBUG_2) << user->nick << " matched akick " << (autokick->HasFlag(AK_ISNICK) ? autokick->nc->display : autokick->mask); autokick->last_used = Anope::CurTime; @@ -757,7 +765,6 @@ bool ChannelInfo::CheckKick(User *user) else mask = autokick->mask; reason = autokick->reason.empty() ? Config->CSAutokickReason : autokick->reason; - do_kick = true; break; } } |
