diff options
Diffstat (limited to 'src/modules/m_callerid.cpp')
-rw-r--r-- | src/modules/m_callerid.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index edf9d6c8e..f2cf112bf 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -22,6 +22,7 @@ #include "inspircd.h" #include "modules/callerid.h" +#include "modules/ctctags.h" enum { @@ -345,7 +346,9 @@ class CallerIDAPIImpl : public CallerID::APIBase }; -class ModuleCallerID : public Module +class ModuleCallerID + : public Module + , public CTCTags::EventListener { CommandAccept cmd; CallerIDAPIImpl api; @@ -380,7 +383,8 @@ class ModuleCallerID : public Module public: ModuleCallerID() - : cmd(this) + : CTCTags::EventListener(this) + , cmd(this) , api(this, cmd.extInfo) , myumode(this, "callerid", 'g') { @@ -397,7 +401,7 @@ public: tokens["CALLERID"] = ConvToStr(myumode.GetModeChar()); } - ModResult OnUserPreMessage(User* user, const MessageTarget& target, MessageDetails& details) CXX11_OVERRIDE + ModResult HandleMessage(User* user, const MessageTarget& target) { if (!IS_LOCAL(user) || target.type != MessageTarget::TYPE_USER) return MOD_RES_PASSTHRU; @@ -427,6 +431,16 @@ public: return MOD_RES_PASSTHRU; } + ModResult OnUserPreMessage(User* user, const MessageTarget& target, MessageDetails& details) CXX11_OVERRIDE + { + return HandleMessage(user, target); + } + + ModResult OnUserPreTagMessage(User* user, const MessageTarget& target, CTCTags::TagMessageDetails& details) CXX11_OVERRIDE + { + return HandleMessage(user, target); + } + void OnUserPostNick(User* user, const std::string& oldnick) CXX11_OVERRIDE { if (!tracknick) |