summaryrefslogtreecommitdiff
path: root/src/modules/m_sslmodes.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-04-16 16:19:55 +0100
committerPeter Powell <petpow@saberuk.com>2019-04-16 16:19:55 +0100
commit8459e625349c03039e7545c213f84d8756034390 (patch)
treeb7c217fab179c19b2fad19f4a05820a21a858d8c /src/modules/m_sslmodes.cpp
parent62dc1769c952a7211878181ff595d4328e182f6b (diff)
Update trivially-modifiable modules to handle tag messages.
Diffstat (limited to 'src/modules/m_sslmodes.cpp')
-rw-r--r--src/modules/m_sslmodes.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index f162ceb87..5c436b116 100644
--- a/src/modules/m_sslmodes.cpp
+++ b/src/modules/m_sslmodes.cpp
@@ -23,6 +23,7 @@
#include "inspircd.h"
+#include "modules/ctctags.h"
#include "modules/ssl.h"
enum
@@ -134,7 +135,9 @@ class SSLModeUser : public ModeHandler
}
};
-class ModuleSSLModes : public Module
+class ModuleSSLModes
+ : public Module
+ , public CTCTags::EventListener
{
private:
UserCertificateAPI api;
@@ -143,7 +146,8 @@ class ModuleSSLModes : public Module
public:
ModuleSSLModes()
- : api(this)
+ : CTCTags::EventListener(this)
+ , api(this)
, sslm(this, api)
, sslquery(this, api)
{
@@ -169,7 +173,7 @@ class ModuleSSLModes : public Module
return MOD_RES_PASSTHRU;
}
- ModResult OnUserPreMessage(User* user, const MessageTarget& msgtarget, MessageDetails& details) CXX11_OVERRIDE
+ ModResult HandleMessage(User* user, const MessageTarget& msgtarget)
{
if (msgtarget.type != MessageTarget::TYPE_USER)
return MOD_RES_PASSTHRU;
@@ -203,6 +207,16 @@ class ModuleSSLModes : public Module
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);
+ }
+
ModResult OnCheckBan(User *user, Channel *c, const std::string& mask) CXX11_OVERRIDE
{
if ((mask.length() > 2) && (mask[0] == 'z') && (mask[1] == ':'))