summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-29 16:03:33 -0400
committerAdam <Adam@anope.org>2011-08-29 16:03:33 -0400
commit5cf3ddb7b196173fbac848322bf0ed8e4dfd524b (patch)
treedb07e34ac56822826169cc9d8208a7e2aca34773 /src
parent1e1a41f0e7bd81bd3eee67281cad2bd284d97b86 (diff)
Made config rehashing not wipe opers configured with opersev/oper
Diffstat (limited to 'src')
-rw-r--r--src/config.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config.cpp b/src/config.cpp
index d7bbb6696..fc3fd3db1 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -642,7 +642,8 @@ static bool DoneOperTypes(ServerConfig *, const Anope::string &)
static bool InitOpers(ServerConfig *config, const Anope::string &)
{
for (nickcore_map::const_iterator it = NickCoreList.begin(), it_end = NickCoreList.end(); it != it_end; ++it)
- it->second->o = NULL;
+ if (it->second->o && it->second->o->config)
+ it->second->o = NULL;
for (unsigned i = 0; i < config->Opers.size(); ++i)
delete config->Opers[i];
@@ -674,6 +675,7 @@ static bool DoOper(ServerConfig *config, const Anope::string &, const Anope::str
throw ConfigException("Oper block for " + name + " has invalid oper type " + type);
Oper *o = new Oper(name, password, certfp, ot);
+ o->config = true;
config->Opers.push_back(o);
return true;