From 9c96921f009bafcfb8ca5492fa2e6467c0063547 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 5 Oct 2006 11:47:43 +0000 Subject: Move opertypes/operclasses maps into ServerConfig, for some reason these were global to users.cpp and not accessible to any other file. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5419 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 51692958c..0cef0121a 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -26,18 +26,12 @@ static unsigned long already_sent[MAX_DESCRIPTORS] = {0}; -typedef std::map opertype_t; -typedef opertype_t operclass_t; - -opertype_t opertypes; -operclass_t operclass; - /* XXX: Used for speeding up WriteCommon operations */ unsigned long uniq_id = 0; bool InitTypes(ServerConfig* conf, const char* tag) { - for (opertype_t::iterator n = opertypes.begin(); n != opertypes.end(); n++) + for (opertype_t::iterator n = conf->opertypes.begin(); n != conf->opertypes.end(); n++) { if (n->second) delete[] n->second; @@ -49,7 +43,7 @@ bool InitTypes(ServerConfig* conf, const char* tag) bool InitClasses(ServerConfig* conf, const char* tag) { - for (operclass_t::iterator n = operclass.begin(); n != operclass.end(); n++) + for (operclass_t::iterator n = conf->operclass.begin(); n != conf->operclass.end(); n++) { if (n->second) delete[] n->second; @@ -64,7 +58,7 @@ bool DoType(ServerConfig* conf, const char* tag, char** entries, void** values, char* TypeName = (char*)values[0]; char* Classes = (char*)values[1]; - opertypes[TypeName] = strdup(Classes); + conf->opertypes[TypeName] = strdup(Classes); conf->GetInstance()->Log(DEBUG,"Read oper TYPE '%s' with classes '%s'",TypeName,Classes); return true; } @@ -74,7 +68,7 @@ bool DoClass(ServerConfig* conf, const char* tag, char** entries, void** values, char* ClassName = (char*)values[0]; char* CommandList = (char*)values[1]; - operclass[ClassName] = strdup(CommandList); + conf->operclass[ClassName] = strdup(CommandList); conf->GetInstance()->Log(DEBUG,"Read oper CLASS '%s' with commands '%s'",ClassName,CommandList); return true; } -- cgit v1.2.3