]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_silence.cpp
Replace OnRehash() with ReadConfig() that is called on boot, on module load and on...
[user/henk/code/inspircd.git] / src / modules / m_silence.cpp
index b0ce8f56c2b3a20ab050147f6f706cd98c204c67..c17cd8e360ba8ad88a262e1807a28c32aea5778c 100644 (file)
@@ -23,8 +23,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides support for the /SILENCE command */
-
 /* Improved drop-in replacement for the /SILENCE command
  * syntax: /SILENCE [+|-]<mask> <p|c|i|n|t|a|x> as in <privatemessage|channelmessage|invites|privatenotice|channelnotice|all|exclude>
  *
@@ -303,16 +301,12 @@ class ModuleSilence : public Module
 
        void init() CXX11_OVERRIDE
        {
-               OnRehash(NULL);
                ServerInstance->Modules->AddService(cmdsilence);
                ServerInstance->Modules->AddService(cmdsvssilence);
                ServerInstance->Modules->AddService(cmdsilence.ext);
-
-               Implementation eventlist[] = { I_OnRehash, I_On005Numeric, I_OnUserPreMessage, I_OnUserPreInvite };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
-       void OnRehash(User* user) CXX11_OVERRIDE
+       void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
        {
                maxsilence = ServerInstance->Config->ConfValue("showwhois")->getInt("maxentries", 32);
                if (!maxsilence)