summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/main.h
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-05-14 00:30:56 +0100
committerPeter Powell <petpow@saberuk.com>2019-05-14 01:12:13 +0100
commit61b13aa89ecb38a24faadb0bdb085a8bb3c56d22 (patch)
treeea483f85917f13b6db1b4f9ec2e847c78a214576 /src/modules/m_spanningtree/main.h
parentb9e732f73b0cb8e1fde9181a8b5502927feaf339 (diff)
Add an enumeration for known protocol versions.
Diffstat (limited to 'src/modules/m_spanningtree/main.h')
-rw-r--r--src/modules/m_spanningtree/main.h32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 5d6fd5d99..1186f072c 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -32,17 +32,31 @@
#include "commands.h"
#include "protocolinterface.h"
-/** If you make a change which breaks the protocol, increment this.
- * If you completely change the protocol, completely change the number.
+/** An enumeration of all known protocol versions.
*
- * IMPORTANT: If you make changes, document your changes here, without fail:
- * https://docs.inspircd.org/developer/spanningtree/
- *
- * Failure to document your protocol changes will result in a painfully
- * painful death by pain. You have been warned.
+ * If you introduce new protocol versions please document them here:
+ * https://docs.inspircd.org/spanningtree/changes
*/
-const unsigned int ProtocolVersion = 1205;
-const unsigned int MinCompatProtocol = 1202;
+enum ProtocolVersion
+{
+ /** The linking protocol version introduced in InspIRCd v2.0. */
+ PROTO_INSPIRCD_20 = 1202,
+
+ /** The linking protocol version introduced in InspIRCd v2.1 alpha 0. */
+ PROTO_INSPIRCD_21_A0 = 1203,
+
+ /** The linking protocol version introduced in InspIRCd v2.1 beta 2. */
+ PROTO_INSPIRCD_21_B2 = 1204,
+
+ /** The linking protocol version introduced in InspIRCd v3.0. */
+ PROTO_INSPIRCD_30 = 1205,
+
+ /** The oldest version of the protocol that we support. */
+ PROTO_OLDEST = PROTO_INSPIRCD_20,
+
+ /** The newest version of the protocol that we support. */
+ PROTO_NEWEST = PROTO_INSPIRCD_30
+};
/** Forward declarations
*/