summaryrefslogtreecommitdiff
path: root/include/modules
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-09-23 11:51:09 +0100
committerPeter Powell <petpow@saberuk.com>2019-09-23 13:18:19 +0100
commitcf5d382b822cecd54fdbc77e4c1c4de8a8aa3c35 (patch)
treef05c9f3c3acfc863dd053abacde791f32fa216f1 /include/modules
parenta4305d8f3c3e613be839bdcd61a1d14c87fed5aa (diff)
Add whether the server split with an error to OnServerSplit.
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/server.h24
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
+