summaryrefslogtreecommitdiff
path: root/src/modules/m_callerid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_callerid.cpp')
-rw-r--r--src/modules/m_callerid.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index 1a2fd3a84..3dc932958 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -383,8 +383,12 @@ public:
tokens["CALLERID"] = "g";
}
- ModResult PreText(User* user, User* dest, std::string& text)
+ ModResult OnUserPreMessage(User* user, void* voiddest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype) CXX11_OVERRIDE
{
+ if (!IS_LOCAL(user) || target_type != TYPE_USER)
+ return MOD_RES_PASSTHRU;
+
+ User* dest = static_cast<User*>(voiddest);
if (!dest->IsModeSet(myumode) || (user == dest))
return MOD_RES_PASSTHRU;
@@ -411,14 +415,6 @@ public:
return MOD_RES_PASSTHRU;
}
- 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) && target_type == TYPE_USER)
- return PreText(user, (User*)dest, text);
-
- return MOD_RES_PASSTHRU;
- }
-
void OnUserPostNick(User* user, const std::string& oldnick) CXX11_OVERRIDE
{
if (!tracknick)