diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-27 21:37:28 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-27 21:37:28 +0000 |
commit | 11e2a3e2ebc04801099384e13c2bc5fc3e504b48 (patch) | |
tree | 9b3fe56be276771c303d4f63f2cac28686ad0fa2 /src | |
parent | dfba08638c3b940fb6e96389c12376a411769be1 (diff) |
Fix recursion crash
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10330 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/users.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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); |