aboutsummaryrefslogtreecommitdiffstats
path: root/include/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-06-17 14:43:57 +0100
committerGravatar Sadie Powell2026-06-17 14:53:52 +0100
commitb9bcc7846af839cf8a5190fb5ce910267a9dbbbe (patch)
tree8e619aeddf02b331d77b8b18bd59ee79a4c99b46 /include/modules
parentFix missing caps in the list output when when the line overflows. (diff)
Allow modules to send the ISupport list to clients.
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/isupport.h29
1 files changed, 29 insertions, 0 deletions
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<ISupport::APIBase>
+{
+public:
+ API(Module* mod)
+ : dynamic_reference<ISupport::APIBase>(mod, "isupportapi")
+ {
+ }
+};
+
class ISupport::EventListener
: public Events::ModuleEventListener
{