diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/modules/server.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/modules/server.h b/include/modules/server.h index 6bd10b3e3..259da868f 100644 --- a/include/modules/server.h +++ b/include/modules/server.h @@ -25,6 +25,7 @@ namespace ServerProtocol { class BroadcastEventListener; class LinkEventListener; + class MessageEventListener; class SyncEventListener; } @@ -66,6 +67,30 @@ class ServerProtocol::LinkEventListener virtual void OnServerSplit(const Server* server) { } }; +class ServerProtocol::MessageEventListener + : public Events::ModuleEventListener +{ + public: + MessageEventListener(Module* mod) + : ModuleEventListener(mod, "event/server-message") + { + } + + /** Fired when a server message is being sent by a user. + * @param source The user who sent the message. + * @param name The name of the command which was sent. + * @param tags The tags which will be sent with the message. + */ + virtual void OnBuildMessage(User* source, const char* name, ClientProtocol::TagMap& tags) { } + + /** Fired when a server message is being sent by a server. + * @param source The server who sent the message. + * @param name The name of the command which was sent. + * @param tags The tags which will be sent with the message. + */ + virtual void OnBuildMessage(Server* source, const char* name, ClientProtocol::TagMap& tags) { } +}; + class ServerProtocol::SyncEventListener : public Events::ModuleEventListener { |