aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_services_account.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-05-16 16:33:16 +0200
committerGravatar attilamolnar2013-05-20 23:30:11 +0200
commit7a67685bcb863b0d4199715e86697fee423596c2 (patch)
treee9d5d9de3a8ea66b785131012e2a777eaa8004e5 /src/modules/m_services_account.cpp
parentFixup last commit (diff)
downloadinspircd++-7a67685bcb863b0d4199715e86697fee423596c2.tar.gz
inspircd++-7a67685bcb863b0d4199715e86697fee423596c2.tar.bz2
inspircd++-7a67685bcb863b0d4199715e86697fee423596c2.zip
Remove OnUserPreNotice and OnUserNotice hooks, add MessageType argument to OnUserMessage and OnUserPreMessage
All modules (except m_nonotice) that perform filtering on messages have common logic for handling PRIVMSGs and NOTICEs and most of them run the exact same code in both cases
Diffstat (limited to 'src/modules/m_services_account.cpp')
-rw-r--r--src/modules/m_services_account.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index bb4dc5ecc..e42c02ff2 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -122,7 +122,7 @@ class ModuleServicesAccount : public Module
{
ServiceProvider* providerlist[] = { &m1, &m2, &m3, &m4, &m5, &accountname };
ServerInstance->Modules->AddServices(providerlist, sizeof(providerlist)/sizeof(ServiceProvider*));
- Implementation eventlist[] = { I_OnWhois, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreJoin, I_OnCheckBan,
+ Implementation eventlist[] = { I_OnWhois, I_OnUserPreMessage, I_OnUserPreJoin, I_OnCheckBan,
I_OnDecodeMetaData, I_On005Numeric, I_OnUserPostNick, I_OnSetConnectClass };
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
@@ -163,7 +163,7 @@ class ModuleServicesAccount : public Module
}
}
- ModResult OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) CXX11_OVERRIDE
+ ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype) CXX11_OVERRIDE
{
if (!IS_LOCAL(user))
return MOD_RES_PASSTHRU;
@@ -234,11 +234,6 @@ class ModuleServicesAccount : public Module
return MOD_RES_PASSTHRU;
}
- ModResult OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) CXX11_OVERRIDE
- {
- return OnUserPreMessage(user, dest, target_type, text, status, exempt_list);
- }
-
ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE
{
std::string *account = accountname.get(user);