From cf5d382b822cecd54fdbc77e4c1c4de8a8aa3c35 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 23 Sep 2019 11:51:09 +0100 Subject: Add whether the server split with an error to OnServerSplit. --- include/modules/server.h | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'include/modules/server.h') diff --git a/include/modules/server.h b/include/modules/server.h index 259da868f..c758df364 100644 --- a/include/modules/server.h +++ b/include/modules/server.h @@ -19,6 +19,11 @@ #pragma once +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + #include "event.h" namespace ServerProtocol @@ -61,10 +66,16 @@ class ServerProtocol::LinkEventListener */ virtual void OnServerLink(const Server* server) { } - /** Fired when a server splits - * @param server Server that split - */ - virtual void OnServerSplit(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 @@ -134,3 +145,8 @@ class ServerEventListener { } }; + +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + -- cgit v1.2.3