diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-03-25 11:03:29 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-03-25 11:03:29 +0100 |
commit | 8f31b0cf2a753cd7b6af8fd1dc730d0693ebeb90 (patch) | |
tree | aeeb61f5ca048f06ec9a572002a76ce35c484b61 | |
parent | bc730a5d1a6df1c3ff5000a96eda6e153134ae04 (diff) |
Change storage of UserManager::all_opers to be a vector
-rw-r--r-- | include/usermanager.h | 2 | ||||
-rw-r--r-- | src/users.cpp | 4 |
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); |