diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_banexception.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_chanfilter.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_chanprotect.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_inviteexception.cpp | 8 |
5 files changed, 7 insertions, 26 deletions
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) { |