From 11e2a3e2ebc04801099384e13c2bc5fc3e504b48 Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 27 Aug 2008 21:37:28 +0000 Subject: Fix recursion crash git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10330 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/users.cpp b/src/users.cpp index adf32b752..affd89815 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -784,6 +784,13 @@ void User::UnOper() { if (IS_OPER(this)) { + /* + * unset their oper type (what IS_OPER checks). + * note, order is important - this must come before modes as -o attempts + * to call UnOper. -- w00t + */ + this->oper.clear(); + /* Remove all oper only modes from the user when the deoper - Bug #466*/ std::string moderemove("-"); @@ -799,9 +806,6 @@ void User::UnOper() parameters.push_back(moderemove); ServerInstance->Parser->CallHandler("MODE", parameters, this); - - /* unset their oper type (what IS_OPER checks), and remove +o */ - this->oper.clear(); /* remove the user from the oper list. Will remove multiple entries as a safeguard against bug #404 */ ServerInstance->Users->all_opers.remove(this); -- cgit v1.2.3