diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-11-21 00:15:13 +0100 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-11-29 23:41:22 +0100 |
commit | a589577b68cb84bc877ecdd4c0f9cb84a1581ddd (patch) | |
tree | 37a4f52f9bcac855d7fa2198f991a2fc919ea738 /src/modules | |
parent | 83db3dc06a44b50d8e25828e201a51edb4030d92 (diff) |
Add a typedef for LocalUserList
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_geoip.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_close.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_jumpserver.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_nationalchars.cpp | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp index ffb4c1922..f92054f9e 100644 --- a/src/modules/extra/m_geoip.cpp +++ b/src/modules/extra/m_geoip.cpp @@ -60,7 +60,7 @@ class ModuleGeoIP : public Module Implementation eventlist[] = { I_OnSetConnectClass, I_OnStats }; ServerInstance->Modules->Attach(eventlist, this, 2); - for (std::vector<LocalUser*>::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i) + for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i) { LocalUser* user = *i; if ((user->registered == REG_ALL) && (!ext.get(user))) diff --git a/src/modules/m_close.cpp b/src/modules/m_close.cpp index ec02b6464..5a6e7e963 100644 --- a/src/modules/m_close.cpp +++ b/src/modules/m_close.cpp @@ -36,10 +36,9 @@ class CommandClose : public Command { std::map<std::string,int> closed; - std::vector<LocalUser*>::reverse_iterator u = ServerInstance->Users->local_users.rbegin(); - while (u != ServerInstance->Users->local_users.rend()) + for (LocalUserList::const_iterator u = ServerInstance->Users->local_users.begin(); u != ServerInstance->Users->local_users.end(); ++u) { - LocalUser* user = *u++; + LocalUser* user = *u; if (user->registered != REG_ALL) { ServerInstance->Users->QuitUser(user, "Closing all unknown connections per request"); diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp index 2d304ab74..ac3add29b 100644 --- a/src/modules/m_jumpserver.cpp +++ b/src/modules/m_jumpserver.cpp @@ -99,7 +99,7 @@ class CommandJumpserver : public Command if (redirect_all_immediately) { /* Redirect everyone but the oper sending the command */ - for (std::vector<LocalUser*>::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); i++) + for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i) { User* t = *i; if (!IS_OPER(t)) diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp index c59c1ba2a..587eaf56d 100644 --- a/src/modules/m_nationalchars.cpp +++ b/src/modules/m_nationalchars.cpp @@ -268,7 +268,7 @@ class ModuleNationalChars : public Module if (!forcequit) return; - for (std::vector<LocalUser*>::iterator iter = ServerInstance->Users->local_users.begin(); iter != ServerInstance->Users->local_users.end(); ++iter) + for (LocalUserList::const_iterator iter = ServerInstance->Users->local_users.begin(); iter != ServerInstance->Users->local_users.end(); ++iter) { /* Fix by Brain: Dont quit UID users */ User* n = *iter; |