X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_helpop.cpp;h=2fe958a71c2c96fa4c7bc71be7e0741a4c667c48;hb=f62654a6859998f9d63eb22702c572d5ebcff15c;hp=64bdc2400c6410a99d665c24d545c7b1de5f9cb6;hpb=b5bc73e31026ee2087f0ceb5c7d9f99bf3c288a6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 64bdc2400..2fe958a71 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -96,7 +96,6 @@ class CommandHelpop : public Command class ModuleHelpop : public Module { - std::string h_file; CommandHelpop cmd; Helpop ho; @@ -108,7 +107,7 @@ class ModuleHelpop : public Module void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { - helpop_map.clear(); + HelpopMap help; ConfigTagList tags = ServerInstance->Config->ConfTags("helpop"); for(ConfigIter i = tags.first; i != tags.second; ++i) @@ -123,20 +122,21 @@ class ModuleHelpop : public Module throw ModuleException("m_helpop: The key 'index' is reserved for internal purposes. Please remove it."); } - helpop_map[key] = value; + help[key] = value; } - if (helpop_map.find("start") == helpop_map.end()) + if (help.find("start") == help.end()) { // error! throw ModuleException("m_helpop: Helpop file is missing important entry 'start'. Please check the example conf."); } - else if (helpop_map.find("nohelp") == helpop_map.end()) + else if (help.find("nohelp") == help.end()) { // error! throw ModuleException("m_helpop: Helpop file is missing important entry 'nohelp'. Please check the example conf."); } + helpop_map.swap(help); } void OnWhois(User* src, User* dst) CXX11_OVERRIDE