diff options
author | Adam <Adam@anope.org> | 2010-12-25 01:19:02 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-25 01:19:02 -0500 |
commit | 852ed51ed7cb9cd2ff503b2ab854fc756b961f72 (patch) | |
tree | eeaa3ac601ff47a046f1db630d7cc3a8607d26c5 | |
parent | 0f63790b4cb86bd40f6ab7d558907ef463c58dea (diff) |
Fixed bug #1217 again... works better now
-rw-r--r-- | modules/core/cs_xop.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/core/cs_xop.cpp b/modules/core/cs_xop.cpp index a3bcb119e..2cfff58ab 100644 --- a/modules/core/cs_xop.cpp +++ b/modules/core/cs_xop.cpp @@ -285,7 +285,6 @@ class XOPBase : public Command CommandReturn DoDel(User *u, const std::vector<Anope::string> ¶ms, ChannelInfo *ci, int level, LanguageString *messages) { Anope::string nick = params.size() > 2 ? params[2] : ""; - ChanAccess *access; if (nick.empty()) { @@ -329,16 +328,18 @@ class XOPBase : public Command return MOD_CONT; } NickCore *nc = na->nc; + + ChanAccess *access = NULL; unsigned i, end; for (i = 0, end = ci->GetAccessCount(); i < end; ++i) { - access = ci->GetAccess(nc, i); + access = ci->GetAccess(i); - if (access->nc == nc) + if (access->nc == nc && access->level == level) break; } - if (i == end || access->level != level) + if (i == end) { u->SendMessage(ChanServ, messages[XOP_NOT_FOUND], nick.c_str(), ci->name.c_str()); return MOD_CONT; |