From 6fa2633311098d9775593186f5f5e1d339434cd2 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Nov 2007 22:15:46 +0000 Subject: Fix these to use new hook system (u_listmode wasnt fixed yet) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8533 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 5 ----- src/modules/m_banexception.cpp | 5 ++--- src/modules/m_chanfilter.cpp | 8 ++------ src/modules/m_chanprotect.cpp | 7 +------ src/modules/m_inviteexception.cpp | 8 ++------ 5 files changed, 7 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5b21f197c..871ed5ab2 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -494,11 +494,6 @@ InspIRCd::InspIRCd(int argc, char** argv) CheckDie(); int bounditems = BindPorts(true, found_ports, pl); - for(int t = 0; t < 255; t++) - Config->global_implementation[t] = 0; - - memset(&Config->implement_lists,0,sizeof(Config->implement_lists)); - printf("\n"); this->Res = new DNS(this); diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index 2066cc524..dda6a5b1d 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -42,15 +42,14 @@ class ModuleBanException : public Module public: - ModuleBanException(InspIRCd* Me) - : Module(Me) + ModuleBanException(InspIRCd* Me) : Module(Me) { be = new BanException(ServerInstance); if (!ServerInstance->AddMode(be)) throw ModuleException("Could not add new modes!"); ServerInstance->Modules->PublishInterface("ChannelBanList", this); - //be->DoImplements(List); + be->DoImplements(this); Implementation list[] = { I_OnRehash, I_OnRequest, I_On005Numeric, I_OnCheckBan }; Me->Modules->Attach(list, this, 4); diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index bef20a365..53a0ff033 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -68,16 +68,12 @@ class ModuleChanFilter : public Module cf = new ChanFilter(ServerInstance); if (!ServerInstance->AddMode(cf)) throw ModuleException("Could not add new modes!"); + + cf->DoImplements(this); Implementation eventlist[] = { I_OnCleanup, I_OnChannelDelete, I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice, I_OnSyncChannel }; ServerInstance->Modules->Attach(eventlist, this, 6); } - void Implements(char* List) - { - cf->DoImplements(List); - List[I_OnCleanup] = List[I_OnChannelDelete] = List[I_OnRehash] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnSyncChannel] = 1; - } - virtual void OnChannelDelete(Channel* chan) { cf->DoChannelDelete(chan); diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index b90765ec1..54691f05d 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -14,7 +14,6 @@ #include "inspircd.h" /* $ModDesc: Provides channel modes +a and +q */ -/* $ModDep: ../../include/u_listmode.h */ #define PROTECT_VALUE 40000 #define FOUNDER_VALUE 50000 @@ -311,15 +310,11 @@ class ModuleChanProtect : public Module if (!ServerInstance->AddMode(cp) || !ServerInstance->AddMode(cf)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserKick, I_OnUserPart, I_OnRehash, I_OnUserPreJoin, I_OnPostJoin, I_OnAccessCheck, I_OnSyncChannel }; ServerInstance->Modules->Attach(eventlist, this, 7); } - void Implements(char* List) - { - List[I_OnUserKick] = List[I_OnUserPart] = List[I_OnRehash] = List[I_OnUserPreJoin] = List[I_OnPostJoin] = List[I_OnAccessCheck] = List[I_OnSyncChannel] = 1; - } - virtual void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent) { // FIX: when someone gets kicked from a channel we must remove their Extensibles! diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index a38f7ed8a..a29e8e4ba 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -47,15 +47,11 @@ public: if (!ServerInstance->AddMode(ie)) throw ModuleException("Could not add new modes!"); ServerInstance->Modules->PublishInterface("ChannelBanList", this); + + ie->DoImplements(this); Implementation eventlist[] = { I_OnRequest, I_On005Numeric, I_OnCheckInvite }; ServerInstance->Modules->Attach(eventlist, this, 3); } - - virtual void Implements(char* List) - { - ie->DoImplements(List); - List[I_OnRequest] = List[I_On005Numeric] = List[I_OnCheckInvite] = 1; - } virtual void On005Numeric(std::string &output) { -- cgit v1.2.3