summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/usermanager.h2
-rw-r--r--src/users.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/usermanager.h b/include/usermanager.h
index 57306c8fb..a419916f2 100644
--- a/include/usermanager.h
+++ b/include/usermanager.h
@@ -37,7 +37,7 @@ class CoreExport UserManager
/** Sequence container in which each element is a User*
*/
- typedef std::list<User*> OperList;
+ typedef std::vector<User*> OperList;
private:
/** Map of IP addresses for clone counting
diff --git a/src/users.cpp b/src/users.cpp
index a78e9635b..a52c392fc 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -471,8 +471,8 @@ void User::UnOper()
ServerInstance->Modes->Process(parameters, this);
- /* remove the user from the oper list. Will remove multiple entries as a safeguard against bug #404 */
- ServerInstance->Users->all_opers.remove(this);
+ // Remove the user from the oper list
+ stdalgo::vector::swaperase(ServerInstance->Users->all_opers, this);
ModeHandler* opermh = ServerInstance->Modes->FindMode('o', MODETYPE_USER);
this->SetMode(opermh, false);