X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_customprefix.cpp;h=f6f9a84f691220925fd04342a27b2301b897dc9a;hb=aa05a6fd4d5c11dc8e8adc469134a2802446fe9f;hp=107c6d684b4e0497478e56ed1f417f1e973481a9;hpb=1e8389b27ff99ad9f48c890486ebef936acafc41;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp index 107c6d684..f6f9a84f6 100644 --- a/src/modules/m_customprefix.cpp +++ b/src/modules/m_customprefix.cpp @@ -26,14 +26,13 @@ class CustomPrefixMode : public PrefixMode bool depriv; CustomPrefixMode(Module* parent, ConfigTag* Tag) - : PrefixMode(parent, Tag->getString("name"), 0) + : PrefixMode(parent, Tag->getString("name"), 0, Tag->getInt("rank")) , tag(Tag) { std::string v = tag->getString("prefix"); prefix = v.c_str()[0]; v = tag->getString("letter"); mode = v.c_str()[0]; - prefixrank = tag->getInt("rank"); levelrequired = tag->getInt("ranktoset", prefixrank); depriv = tag->getBool("depriv", true); } @@ -76,8 +75,7 @@ class ModuleCustomPrefix : public Module ~ModuleCustomPrefix() { - for (std::vector::iterator i = modes.begin(); i != modes.end(); i++) - delete *i; + stdalgo::delete_all(modes); } Version GetVersion() CXX11_OVERRIDE