summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/configreader.h2
-rw-r--r--src/configreader.cpp11
-rw-r--r--src/users.cpp2
3 files changed, 3 insertions, 12 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 7761ca94a..29289dcaf 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -224,7 +224,7 @@ struct MultiConfig
/** A set of oper types
*/
-typedef std::map<irc::string,char*> opertype_t;
+typedef std::map<irc::string,std::string> opertype_t;
/** Holds an oper class.
*/
diff --git a/src/configreader.cpp b/src/configreader.cpp
index e23f5750d..0fcf88e9d 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -2205,15 +2205,6 @@ bool ValueItem::GetBool()
*/
bool InitTypes(ServerConfig* conf, const char*)
{
- if (conf->opertypes.size())
- {
- for (opertype_t::iterator n = conf->opertypes.begin(); n != conf->opertypes.end(); n++)
- {
- if (n->second)
- delete[] n->second;
- }
- }
-
conf->opertypes.clear();
return true;
}
@@ -2250,7 +2241,7 @@ bool DoType(ServerConfig* conf, const char*, char**, ValueList &values, int*)
const char* TypeName = values[0].GetString();
const char* Classes = values[1].GetString();
- conf->opertypes[TypeName] = strnewdup(Classes);
+ conf->opertypes[TypeName] = std::string(Classes);
return true;
}
diff --git a/src/users.cpp b/src/users.cpp
index c84bc00d9..15e1ab72b 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -776,7 +776,7 @@ void User::Oper(const std::string &opertype, const std::string &opername)
this->AllowedUserModes['o' - 'A'] = true; // Call me paranoid if you want.
std::string myclass, mycmd, mypriv;
- irc::spacesepstream Classes(iter_opertype->second);
+ irc::spacesepstream Classes(iter_opertype->second.c_str());
while (Classes.GetToken(myclass))
{
operclass_t::iterator iter_operclass = ServerInstance->Config->operclass.find(myclass.c_str());