+ /** Fired when a server has finished bursting.
+ * @param server Server that recently finished bursting.
+ */
+ virtual void OnServerBurst(const Server* server) { }
+
+ /** Fired when a server splits
+ * @param server Server that split
+ * @param error Whether the server split because of an error.
+ */
+ virtual void OnServerSplit(const Server* server, bool error) { OnServerSplit(server); }
+
+ /** Fired when a server splits
+ * @param server Server that split
+ */
+ DEPRECATED_METHOD(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
+{
+ public:
+ SyncEventListener(Module* mod)
+ : ModuleEventListener(mod, "event/server-sync")
+ {
+ }