diff options
author | Peter Powell <petpow@saberuk.com> | 2019-09-23 11:51:09 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-09-23 13:18:19 +0100 |
commit | cf5d382b822cecd54fdbc77e4c1c4de8a8aa3c35 (patch) | |
tree | f05c9f3c3acfc863dd053abacde791f32fa216f1 /include/modules/server.h | |
parent | a4305d8f3c3e613be839bdcd61a1d14c87fed5aa (diff) |
Add whether the server split with an error to OnServerSplit.
Diffstat (limited to 'include/modules/server.h')
-rw-r--r-- | include/modules/server.h | 24 |
1 files changed, 20 insertions, 4 deletions
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 + |