diff options
-rw-r--r-- | include/configreader.h | 4 | ||||
-rw-r--r-- | include/typedefs.h | 4 | ||||
-rw-r--r-- | src/coremods/core_stats.cpp | 4 | ||||
-rw-r--r-- | src/users.cpp | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/include/configreader.h b/include/configreader.h index f3b1f8b74..8615388d5 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -227,6 +227,10 @@ class CoreExport ServerConfig std::string PrependModule(const std::string& fn) const { return FileSystem::ExpandPath(Module, fn); } }; + /** Holds a complete list of all connect blocks + */ + typedef std::vector<reference<ConnectClass> > ClassVector; + /** Get a configuration tag * @param tag The name of the tag to get */ diff --git a/include/typedefs.h b/include/typedefs.h index bd236dc62..85d86504f 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -61,10 +61,6 @@ typedef intrusive_list<LocalUser> LocalUserList; /** A list of failed port bindings, used for informational purposes on startup */ typedef std::vector<std::pair<std::string, std::string> > FailedPortList; -/** Holds a complete list of all allow and deny tags from the configuration file (connection classes) - */ -typedef std::vector<reference<ConnectClass> > ClassVector; - /** List of channels to consider when building the neighbor list of a user */ typedef std::vector<Membership*> IncludeChanList; diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp index e28b3d1ef..f9cd78ddd 100644 --- a/src/coremods/core_stats.cpp +++ b/src/coremods/core_stats.cpp @@ -103,7 +103,7 @@ void CommandStats::DoStats(char statschar, User* user, string_list &results) case 'i': { - for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++) + for (ServerConfig::ClassVector::const_iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); ++i) { ConnectClass* c = *i; std::stringstream res; @@ -132,7 +132,7 @@ void CommandStats::DoStats(char statschar, User* user, string_list &results) case 'Y': { int idx = 0; - for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++) + for (ServerConfig::ClassVector::const_iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++) { ConnectClass* c = *i; results.push_back("215 "+user->nick+" i NOMATCH * "+c->GetHost()+" "+ConvToStr(c->limit ? c->limit : SocketEngine::GetMaxFds())+" "+ConvToStr(idx)+" "+ServerInstance->Config->ServerName+" *"); diff --git a/src/users.cpp b/src/users.cpp index c2b8852d8..246efd7cf 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1078,7 +1078,7 @@ void LocalUser::SetClass(const std::string &explicit_name) if (!explicit_name.empty()) { - for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++) + for (ServerConfig::ClassVector::const_iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); ++i) { ConnectClass* c = *i; @@ -1091,7 +1091,7 @@ void LocalUser::SetClass(const std::string &explicit_name) } else { - for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++) + for (ServerConfig::ClassVector::const_iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); ++i) { ConnectClass* c = *i; ServerInstance->Logs->Log("CONNECTCLASS", LOG_DEBUG, "Checking %s", c->GetName().c_str()); |