From b9bcc7846af839cf8a5190fb5ce910267a9dbbbe Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 17 Jun 2026 14:43:57 +0100 Subject: Allow modules to send the ISupport list to clients. --- include/modules/isupport.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'include/modules') diff --git a/include/modules/isupport.h b/include/modules/isupport.h index 47d01c950..8999eb88b 100644 --- a/include/modules/isupport.h +++ b/include/modules/isupport.h @@ -21,6 +21,8 @@ namespace ISupport { + class API; + class APIBase; class EventListener; class EventProvider; @@ -34,6 +36,33 @@ enum RPL_ISUPPORT = 5, }; +/** Defines the interface for the ISupport API. */ +class ISupport::APIBase + : public DataProvider +{ +public: + APIBase(Module* mod) + : DataProvider(mod, "isupportapi") + { + } + + /** Sends a full ISupport numeric set to the specified user. + * @param user The user to send to. + */ + virtual void SendTo(LocalUser* user) const = 0; +}; + +/** Allows modules to send ISupport messages to users. */ +class ISupport::API final + : public dynamic_reference +{ +public: + API(Module* mod) + : dynamic_reference(mod, "isupportapi") + { + } +}; + class ISupport::EventListener : public Events::ModuleEventListener { -- cgit v1.3.1-10-gc9f91