diff options
author | DukePyrolator <DukePyrolator@anope.org> | 2010-12-14 08:13:09 +0100 |
---|---|---|
committer | DukePyrolator <DukePyrolator@anope.org> | 2010-12-14 08:13:09 +0100 |
commit | 02476332ea2f5ab3fd766e0ca9d83d67a9a9f122 (patch) | |
tree | 4e75a625d87bea08faf16619fb27ff75f83d8c19 /src/actions.cpp | |
parent | 6a43886807c74503dd89ad6bae0e5605a3e21210 (diff) | |
parent | 49d3c97b677f319460146803004066dfd3d19089 (diff) |
Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'src/actions.cpp')
-rw-r--r-- | src/actions.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/actions.cpp b/src/actions.cpp index b583cafae..6df607460 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -67,25 +67,21 @@ void kill_user(const Anope::string &source, User *user, const Anope::string &rea * Unban the user from a channel * @param ci channel info for the channel * @param u The user to unban + * @param full True to match against the users real host and IP * @return void */ -void common_unban(ChannelInfo *ci, User *u) +void common_unban(ChannelInfo *ci, User *u, bool full) { if (!u || !ci || !ci->c || !ci->c->HasMode(CMODE_BAN)) return; - if (ircd->svsmode_unban) - ircdproto->SendBanDel(ci->c, u->nick); - else + std::pair<Channel::ModeList::iterator, Channel::ModeList::iterator> bans = ci->c->GetModeList(CMODE_BAN); + for (; bans.first != bans.second;) { - std::pair<Channel::ModeList::iterator, Channel::ModeList::iterator> bans = ci->c->GetModeList(CMODE_BAN); - for (; bans.first != bans.second;) - { - Entry ban(bans.first->second); - ++bans.first; - if (ban.Matches(u)) - ci->c->RemoveMode(NULL, CMODE_BAN, ban.GetMask()); - } + Entry ban(bans.first->second); + ++bans.first; + if (ban.Matches(u, full)) + ci->c->RemoveMode(NULL, CMODE_BAN, ban.GetMask()); } } |