]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Hook events properly.
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 7 Apr 2008 22:39:19 +0000 (22:39 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 7 Apr 2008 22:39:19 +0000 (22:39 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9411 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_shun.cpp

index 509ed3ae1be528aa12497531f1d90fd0e2cd2794..db800527d5411d6692a75f1867b34339a558cc5d 100644 (file)
@@ -166,6 +166,9 @@ class ModuleShun : public Module
 
                mycommand = new cmd_shun(ServerInstance);
                ServerInstance->AddCommand(mycommand);
+
+               Implementation eventlist[] = { I_OnStats, I_OnPreCommand };
+               ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
        virtual ~ModuleShun()
@@ -173,11 +176,6 @@ class ModuleShun : public Module
                ServerInstance->XLines->UnregisterFactory(f);
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnPreCommand] = List[I_OnStats] = 1;
-       }
-       
        virtual int OnStats(char symbol, User* user, string_list& out)
        {
                // XXX write me