summaryrefslogtreecommitdiff
path: root/modules/core/cs_akick.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-04-25 03:16:57 -0400
committerAdam <Adam@anope.org>2011-05-16 04:07:56 -0400
commit076ebafa1b4cc935c466c615b94eaac415af9a67 (patch)
treedbc8b0f9e7b6f954569c13ad35598f5ebe8a081d /modules/core/cs_akick.cpp
parent6922bd239c778e8f6f2081476ce20b9426c515ad (diff)
Moved some global functions to be member functions and misc cleanup
Diffstat (limited to 'modules/core/cs_akick.cpp')
-rw-r--r--modules/core/cs_akick.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/core/cs_akick.cpp b/modules/core/cs_akick.cpp
index e168bdb67..3aafbc537 100644
--- a/modules/core/cs_akick.cpp
+++ b/modules/core/cs_akick.cpp
@@ -192,10 +192,17 @@ class CommandCSAKick : public Command
}
/* Check excepts BEFORE we get this far */
- if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && is_excepted_mask(ci, mask))
+ if (ci->c)
{
- source.Reply(_(CHAN_EXCEPTED), mask.c_str(), ci->name.c_str());
- return;
+ std::pair<Channel::ModeList::iterator, Channel::ModeList::iterator> modes = ci->c->GetModeList(CMODE_EXCEPT);
+ for (; modes.first != modes.second; ++modes.first)
+ {
+ if (Anope::Match(modes.first->second, mask))
+ {
+ source.Reply(_(CHAN_EXCEPTED), mask.c_str(), ci->name.c_str());
+ return;
+ }
+ }
}
/* Check whether target nick has equal/higher access