diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_ircv3_ctctags.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_ircv3_ctctags.cpp b/src/modules/m_ircv3_ctctags.cpp index 16b71e83e..bf39bb381 100644 --- a/src/modules/m_ircv3_ctctags.cpp +++ b/src/modules/m_ircv3_ctctags.cpp @@ -261,6 +261,7 @@ class C2CTags : public ClientProtocol::MessageTagProvider Cap::Capability& cap; public: + bool allowclientonlytags; C2CTags(Module* Creator, Cap::Capability& Cap) : ClientProtocol::MessageTagProvider(Creator) , cap(Cap) @@ -271,7 +272,7 @@ class C2CTags : public ClientProtocol::MessageTagProvider { // A client-only tag is prefixed with a plus sign (+) and otherwise conforms // to the format specified in IRCv3.2 tags. - if (tagname[0] != '+' || tagname.length() < 2) + if (tagname[0] != '+' || tagname.length() < 2 || !allowclientonlytags) return MOD_RES_PASSTHRU; // If the user is local then we check whether they have the message-tags cap @@ -323,6 +324,11 @@ class ModuleIRCv3CTCTags { } + void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE + { + c2ctags.allowclientonlytags = ServerInstance->Config->ConfValue("ctctags")->getBool("allowclientonlytags", true); + } + ModResult OnUserPreMessage(User* user, const MessageTarget& target, MessageDetails& details) CXX11_OVERRIDE { return CopyClientTags(details.tags_in, details.tags_out); |