]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nonotice.cpp
Convert WriteNumeric() calls to pass the parameters of the numeric as method parameters
[user/henk/code/inspircd.git] / src / modules / m_nonotice.cpp
index c7537295346e1448dfe8f4c22a80c0443f1405c5..3d6d0bb099422808e9f8af07c8fe385e50fbc2db 100644 (file)
@@ -21,8 +21,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides channel mode +T to block notices to the channel */
-
 class NoNotice : public SimpleChannelModeHandler
 {
  public:
@@ -39,13 +37,6 @@ class ModuleNoNotice : public Module
        {
        }
 
-       void init() CXX11_OVERRIDE
-       {
-               ServerInstance->Modules->AddService(nt);
-               Implementation eventlist[] = { I_OnUserPreMessage, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
-       }
-
        void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
        {
                tokens["EXTBAN"].push_back('T');
@@ -64,7 +55,7 @@ class ModuleNoNotice : public Module
                                        return MOD_RES_PASSTHRU;
                                else
                                {
-                                       user->WriteNumeric(ERR_CANNOTSENDTOCHAN, "%s %s :Can't send NOTICE to channel (+T set)",user->nick.c_str(), c->name.c_str());
+                                       user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, "Can't send NOTICE to channel (+T set)");
                                        return MOD_RES_DENY;
                                }
                        }