]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanprotect.cpp
Add Base64 encode/decode functions to the core
[user/henk/code/inspircd.git] / src / modules / m_chanprotect.cpp
index 77fe3f353b66df0eb4bb257083b9012a0319e6a8..872ff8d7c22b4c99c4e606e93dde60e7bab0ab72 100644 (file)
@@ -162,7 +162,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase
 {
  public:
        ChanProtect(Module* Creator)
-               : ModeHandler(Creator, "protected", 'a', PARAM_ALWAYS, MODETYPE_CHANNEL),
+               : ModeHandler(Creator, "admin", 'a', PARAM_ALWAYS, MODETYPE_CHANNEL),
                  FounderProtectBase('a',"protected user", 388, 389)
        {
                ModeHandler::list = true;
@@ -230,15 +230,17 @@ class ModuleChanProtect : public Module
        ChanFounder cf;
  public:
        ModuleChanProtect() : cp(this), cf(this)
+       {
+       }
+
+       void init()
        {
                /* Load config stuff */
                LoadSettings();
                settings.booting = false;
 
-               if (!ServerInstance->Modes->AddMode(&cp) || !ServerInstance->Modes->AddMode(&cf))
-               {
-                       throw ModuleException("Could not add new modes!");
-               }
+               ServerInstance->Modules->AddService(cf);
+               ServerInstance->Modules->AddService(cp);
 
                Implementation eventlist[] = { I_OnUserPreJoin };
                ServerInstance->Modules->Attach(eventlist, this, 1);
@@ -287,7 +289,7 @@ class ModuleChanProtect : public Module
 
        Version GetVersion()
        {
-               return Version("Founder and Protect modes (+qa)", VF_COMMON | VF_VENDOR);
+               return Version("Founder and Protect modes (+qa)", VF_VENDOR);
        }
 };