diff options
| author | 2023-08-19 16:27:02 +0100 | |
|---|---|---|
| committer | 2023-08-19 16:27:02 +0100 | |
| commit | 3487101cc190ea5529e9d6cf893a94f308f89a67 (patch) | |
| tree | 00593e82539883e905741316162fe7c6b0dd121f /src/modules/m_services.cpp | |
| parent | Don't include "regex/" in the link data of the filter/rline modules. (diff) | |
Move the inspircd.org/service tag to the services module.
Diffstat (limited to 'src/modules/m_services.cpp')
| -rw-r--r-- | src/modules/m_services.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp index fdf4cf260..754008aa0 100644 --- a/src/modules/m_services.cpp +++ b/src/modules/m_services.cpp @@ -19,6 +19,7 @@ #include "inspircd.h" #include "modules/account.h" +#include "modules/ctctags.h" #include "modules/stats.h" #include "timeutils.h" #include "xline.h" @@ -76,6 +77,23 @@ public: } }; +class ServiceTag final + : public CTCTags::TagProvider +{ +public: + ServiceTag(Module* mod) + : CTCTags::TagProvider(mod) + { + } + + void OnPopulateTags(ClientProtocol::Message& msg) override + { + const auto* user = msg.GetSourceUser(); + if (user && user->server->IsService()) + msg.AddTag("inspircd.org/service", this, ""); + } +}; + class ServProtect final : public SimpleUserMode { @@ -199,6 +217,7 @@ private: Account::API accountapi; RegisteredChannel registeredcmode; RegisteredUser registeredumode; + ServiceTag servicetag; ServProtect servprotectmode; SVSHoldFactory svsholdfactory; CommandSVSHold svsholdcmd; @@ -211,6 +230,7 @@ public: , accountapi(this) , registeredcmode(this) , registeredumode(this) + , servicetag(this) , servprotectmode(this) , svsholdcmd(this) { |
