git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11309
e03df62e-2008-0410-955e-
edbf42e46eb7
/** 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.
*/
*/
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;
}
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;
}
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());