From 43ba6d2a5256e7b74b9c96df9d603957e624c710 Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 7 Apr 2008 22:39:19 +0000 Subject: [PATCH] Hook events properly. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9411 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_shun.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 509ed3ae1..db800527d 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -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 -- 2.39.5