summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-01-03 20:48:07 +0000
committerSadie Powell <sadie@witchery.services>2020-01-03 21:01:52 +0000
commita9e8e1f03ace24e9dcb50299f8e66c5fd6b42850 (patch)
tree4396a3cf211c68b5739afa2c67ba856739dccf1f /include
parent45eff275cbc942a9b16f55367e6d5bd2bbfad2e0 (diff)
Add an event provider class for the event/messagetag event.
Diffstat (limited to 'include')
-rw-r--r--include/clientprotocol.h13
-rw-r--r--include/typedefs.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/include/clientprotocol.h b/include/clientprotocol.h
index 95683dc8f..6ecfbc709 100644
--- a/include/clientprotocol.h
+++ b/include/clientprotocol.h
@@ -515,6 +515,16 @@ class ClientProtocol::Event
void GetMessagesForUser(LocalUser* user, MessageList& messagelist);
};
+class ClientProtocol::MessageTagEvent
+ : public Events::ModuleEventProvider
+{
+ public:
+ MessageTagEvent(Module* mod)
+ : ModuleEventProvider(mod, "event/messagetag")
+ {
+ }
+};
+
/** Base class for message tag providers.
* All message tags belong to a message tag provider. Message tag providers can populate messages
* with tags before the message is sent and they have the job of determining whether a user should
@@ -667,7 +677,8 @@ struct ClientProtocol::RFCEvents
*/
class CoreExport ClientProtocol::Serializer : public DataProvider
{
- Events::ModuleEventProvider evprov;
+ private:
+ ClientProtocol::MessageTagEvent evprov;
/** Make a white list containing which tags a user should get.
* @param user User in question.
diff --git a/include/typedefs.h b/include/typedefs.h
index 20fc596be..d1f46beae 100644
--- a/include/typedefs.h
+++ b/include/typedefs.h
@@ -54,6 +54,7 @@ namespace ClientProtocol
class Event;
class EventProvider;
class Message;
+ class MessageTagEvent;
class MessageTagProvider;
class Serializer;