From 4f6232e6287c7ecf1105bc4154b7b31fe5a00b9d Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 24 Dec 2010 20:15:28 -0500 Subject: [PATCH] Bug #1217 - Fix crash from deleting nonexistant users from XOP list --- modules/core/cs_xop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/cs_xop.cpp b/modules/core/cs_xop.cpp index 4dbd09525..a3bcb119e 100644 --- a/modules/core/cs_xop.cpp +++ b/modules/core/cs_xop.cpp @@ -332,13 +332,13 @@ class XOPBase : public Command unsigned i, end; for (i = 0, end = ci->GetAccessCount(); i < end; ++i) { - access = ci->GetAccess(nc, level); + access = ci->GetAccess(nc, i); if (access->nc == nc) break; } - if (i == end) + if (i == end || access->level != level) { u->SendMessage(ChanServ, messages[XOP_NOT_FOUND], nick.c_str(), ci->name.c_str()); return MOD_CONT;