]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_shun.cpp
m_spanningtree Remove duplicate code for sending channel messages from RouteCommand()
[user/henk/code/inspircd.git] / src / modules / m_shun.cpp
index 6da24208ab1d7dcf4dfc3ca7a1a9ad9d8754611e..dbc1812c700ce96e42f244097e1d13fa4d6bf40e 100644 (file)
 #include "inspircd.h"
 #include "xline.h"
 
-/* $ModDesc: Provides the /SHUN command, which stops a user from executing all except configured commands. */
-
 class Shun : public XLine
 {
 public:
        std::string matchtext;
 
-       Shun(time_t s_time, long d, std::string src, std::string re, std::string shunmask)
+       Shun(time_t s_time, long d, const std::string& src, const std::string& re, const std::string& shunmask)
                : XLine(s_time, d, src, re, "SHUN")
+               , matchtext(shunmask)
        {
-               this->matchtext = shunmask;
        }
 
        bool Matches(User *u)
@@ -184,8 +182,6 @@ class ModuleShun : public Module
                ServerInstance->XLines->RegisterFactory(&f);
                ServerInstance->Modules->AddService(cmd);
 
-               Implementation eventlist[] = { I_OnStats, I_OnPreCommand, I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
                OnRehash(NULL);
        }