diff options
| author | 2021-02-27 18:37:00 +0000 | |
|---|---|---|
| committer | 2022-04-26 16:55:42 +0100 | |
| commit | cf3be77fbf0e1f3764219f2d994d839f93f282c3 (patch) | |
| tree | a8021bec670579b9aee316c354781d98982b74f5 /src/modules/m_botmode.cpp | |
| parent | Migrate Windows build instructions to the docs site. (diff) | |
Implement support for the IRCv3 bot tag.
Diffstat (limited to 'src/modules/m_botmode.cpp')
| -rw-r--r-- | src/modules/m_botmode.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 1ef6663f9..5f455270c 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -45,8 +45,12 @@ class BotTag : public ClientProtocol::MessageTagProvider void OnPopulateTags(ClientProtocol::Message& msg) CXX11_OVERRIDE { User* const user = msg.GetSourceUser(); - if (user && user->IsModeSet(botmode)) - msg.AddTag("inspircd.org/bot", this, ""); + if (!user || !user->IsModeSet(botmode)) + return; + + // TODO: remove inspircd.org/bot in v4. + msg.AddTag("bot", this, ""); + msg.AddTag("inspircd.org/bot", this, ""); } bool ShouldSendTag(LocalUser* user, const ClientProtocol::MessageTagData& tagdata) CXX11_OVERRIDE |
