]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_customprefix.cpp
Remove UserManager::GarbageCollect()
[user/henk/code/inspircd.git] / src / modules / m_customprefix.cpp
index f0b6d88e340cc4fc77246256768ee801a6f355be..f6f9a84f691220925fd04342a27b2301b897dc9a 100644 (file)
@@ -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);
        }
@@ -69,15 +68,14 @@ class ModuleCustomPrefix : public Module
                        }
                        catch (ModuleException& e)
                        {
-                               throw ModuleException(e.err + " (while creating mode from " + tag->getTagLocation() + ")");
+                               throw ModuleException(e.GetReason() + " (while creating mode from " + tag->getTagLocation() + ")");
                        }
                }
        }
 
        ~ModuleCustomPrefix()
        {
-               for (std::vector<CustomPrefixMode*>::iterator i = modes.begin(); i != modes.end(); i++)
-                       delete *i;
+               stdalgo::delete_all(modes);
        }
 
        Version GetVersion() CXX11_OVERRIDE