summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-05 11:47:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-05 11:47:43 +0000
commit9c96921f009bafcfb8ca5492fa2e6467c0063547 (patch)
treef349e7643f896609fdcf89981e3fddb5d3474d81 /src
parent17ba341f7160c78e82ca6d71639d27ab0fa58b85 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp14
1 files changed, 4 insertions, 10 deletions
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<irc::string,char*> 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;
}