X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodmanager_static.cpp;h=9a385dd3ced80d70e41a41d19a6a5c882718d4c5;hb=834c94679b7df475e50d87ccb11311e297a78718;hp=76f16fa92fd140e2594a0ab9062c70b46c99f2b2;hpb=e244cb2c63b1ac1d85bdbb4691f7b1bd940ae804;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modmanager_static.cpp b/src/modmanager_static.cpp index 76f16fa92..9a385dd3c 100644 --- a/src/modmanager_static.cpp +++ b/src/modmanager_static.cpp @@ -23,7 +23,7 @@ #include "exitcodes.h" #include -#ifdef PURE_STATIC +#ifdef INSPIRCD_STATIC typedef std::map modmap; static std::vector* cmdlist = NULL; @@ -69,11 +69,10 @@ class AllModule : public Module ~AllModule() { - for(std::vector::iterator i = cmds.begin(); i != cmds.end(); ++i) - delete *i; + stdalgo::delete_all(cmds); } - Version GetVersion() + Version GetVersion() CXX11_OVERRIDE { return Version("All commands", VF_VENDOR|VF_CORE); } @@ -81,8 +80,9 @@ class AllModule : public Module MODULE_INIT(AllModule) -bool ModuleManager::Load(const std::string& name, bool defer) +bool ModuleManager::Load(const std::string& inputname, bool defer) { + const std::string name = ExpandModName(inputname); modmap::iterator it = modlist->find(name); if (it == modlist->end()) return false;