diff options
| author | 2024-06-19 15:08:20 +0100 | |
|---|---|---|
| committer | 2024-06-19 15:11:10 +0100 | |
| commit | edb7101e6a01f449350a45ee92d5a15abb7bc4bb (patch) | |
| tree | cea31c4ce8b417b4d6d5185af50f153a016bb0be /src/modules/m_spanningtree | |
| parent | Put examples in the example directory on system-wide installs. (diff) | |
Default to PROTO_NEWEST if no protocol is negotiated.
Diffstat (limited to 'src/modules/m_spanningtree')
| -rw-r--r-- | src/modules/m_spanningtree/main.h | 21 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/treesocket.h | 23 |
2 files changed, 22 insertions, 22 deletions
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 96ef70f9d..ab113a658 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -40,27 +40,6 @@ #include "protocolinterface.h" #include "tags.h" -/** An enumeration of all known protocol versions. - * - * If you introduce new protocol versions please document them here: - * https://docs.inspircd.org/spanningtree/changes - */ -enum ProtocolVersion - : uint16_t -{ - /** The linking protocol version introduced in InspIRCd v3.0. */ - PROTO_INSPIRCD_3 = 1205, - - /** The linking protocol version introduced in InspIRCd v4.0a1. */ - PROTO_INSPIRCD_4 = 1206, - - /** The oldest version of the protocol that we support. */ - PROTO_OLDEST = PROTO_INSPIRCD_3, - - /** The newest version of the protocol that we support. */ - PROTO_NEWEST = PROTO_INSPIRCD_4 -}; - /** Forward declarations */ class SpanningTreeUtilities; diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index de1bd1212..ded461c3b 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -31,6 +31,27 @@ #include "utils.h" +/** An enumeration of all known protocol versions. + * + * If you introduce new protocol versions please document them here: + * https://docs.inspircd.org/server/change-log/ + */ +enum ProtocolVersion + : uint16_t +{ + /** The linking protocol version introduced in InspIRCd v3.0. */ + PROTO_INSPIRCD_3 = 1205, + + /** The linking protocol version introduced in InspIRCd v4.0. */ + PROTO_INSPIRCD_4 = 1206, + + /** The oldest version of the protocol that we support. */ + PROTO_OLDEST = PROTO_INSPIRCD_3, + + /** The newest version of the protocol that we support. */ + PROTO_NEWEST = PROTO_INSPIRCD_4 +}; + /* * The server list in InspIRCd is maintained as two structures * which hold the data in different ways. Most of the time, we @@ -183,7 +204,7 @@ public: const time_t age; // The protocol version which has been negotiated with the remote server. - uint16_t proto_version = 0; + uint16_t proto_version = PROTO_NEWEST; /** Because most of the I/O gubbins are encapsulated within * BufferedSocket, we just call the superclass constructor for |
