From a9e8e1f03ace24e9dcb50299f8e66c5fd6b42850 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 3 Jan 2020 20:48:07 +0000 Subject: Add an event provider class for the event/messagetag event. --- include/clientprotocol.h | 13 ++++++++++++- include/typedefs.h | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'include') 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; -- cgit v1.2.3