]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_censor.cpp
Mark +P mode as oper-only now that it no longer requires an explicit permission string
[user/henk/code/inspircd.git] / src / modules / m_censor.cpp
index bb316c8fac64be057e97c7122c00e9ac971b1558..e356ee9a75ae0e52f7040f609133acc5d7eec580 100644 (file)
@@ -44,14 +44,15 @@ class ModuleCensor : public Module
        CensorChannel cc;
 
  public:
-       ModuleCensor()
-               : cu(this), cc(this)
+       ModuleCensor() : cu(this), cc(this) { }
+
+       void init()
        {
                /* Read the configuration file on startup.
                 */
                OnRehash(NULL);
-               if (!ServerInstance->Modes->AddMode(&cu) || !ServerInstance->Modes->AddMode(&cc))
-                       throw ModuleException("Could not add new modes!");
+               ServerInstance->Modules->AddService(cu);
+               ServerInstance->Modules->AddService(cc);
                Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice };
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }
@@ -127,7 +128,7 @@ class ModuleCensor : public Module
 
        virtual Version GetVersion()
        {
-               return Version("Provides user and channel +G mode",VF_COMMON|VF_VENDOR);
+               return Version("Provides user and channel +G mode",VF_VENDOR);
        }
 
 };