diff options
author | Sadie Powell <sadie@witchery.services> | 2020-05-13 17:38:17 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-05-20 16:31:58 +0100 |
commit | 61704664a7d921b0bd2e9eca1af979c670c775ed (patch) | |
tree | 00317d79e0cba70b4965f37d0a0589d831c087cb | |
parent | fdf0e13dd0b9bca161772455e2b29711172451d0 (diff) |
Implement support for the CLIENTTAGDENY token.
Ref: ircv3/ircv3-specifications#412.
-rw-r--r-- | src/modules/m_ircv3_ctctags.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_ircv3_ctctags.cpp b/src/modules/m_ircv3_ctctags.cpp index bf39bb381..3815b025d 100644 --- a/src/modules/m_ircv3_ctctags.cpp +++ b/src/modules/m_ircv3_ctctags.cpp @@ -329,6 +329,12 @@ class ModuleIRCv3CTCTags c2ctags.allowclientonlytags = ServerInstance->Config->ConfValue("ctctags")->getBool("allowclientonlytags", true); } + void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE + { + if (!c2ctags.allowclientonlytags) + tokens["CLIENTTAGDENY"] = "*"; + } + ModResult OnUserPreMessage(User* user, const MessageTarget& target, MessageDetails& details) CXX11_OVERRIDE { return CopyClientTags(details.tags_in, details.tags_out); |