diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-04 22:15:46 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-04 22:15:46 +0000 |
commit | 6fa2633311098d9775593186f5f5e1d339434cd2 (patch) | |
tree | 479d0dba7d2eb88eeb5f850a225f671d710e0864 /src/modules | |
parent | 71b7b578bdac9fdf5e70dde6c3d404660cb1766f (diff) |
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
Diffstat (limited to 'src/modules')
-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 |
4 files changed, 7 insertions, 21 deletions
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) { |