diff options
| author | 2020-10-09 15:12:32 +0100 | |
|---|---|---|
| committer | 2020-12-04 21:11:02 +0000 | |
| commit | 1a91cdbcb0acd24b11185240be4f40ba4c8dfe5f (patch) | |
| tree | 7c9323ef45799a9046bf87e73aa7c4b67c779d34 /src/modules/m_spanningtree | |
| parent | Merge branch 'insp3' into master. (diff) | |
Add support for the 1206 spanningtree protocol.
For now this is identical to 1205 but changes will be happening soon.
Diffstat (limited to 'src/modules/m_spanningtree')
| -rw-r--r-- | src/modules/m_spanningtree/capab.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/main.h | 7 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/treesocket.h | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index 18f25b2c6..ef0e16d2d 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -238,7 +238,7 @@ bool TreeSocket::Capab(const CommandBase::Params& params) capab->OptModuleList.clear(); capab->CapKeys.clear(); if (params.size() > 1) - proto_version = ConvToNum<unsigned int>(params[1]); + proto_version = ConvToNum<uint16_t>(params[1]); if (proto_version < PROTO_OLDEST) { diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index aa8623e0f..9a582bf49 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -45,16 +45,19 @@ * If you introduce new protocol versions please document them here: * https://docs.inspircd.org/spanningtree/changes */ -enum ProtocolVersion +enum ProtocolVersion : uint16_t { /** The linking protocol version introduced in InspIRCd v3.0. */ PROTO_INSPIRCD_30 = 1205, + /** The linking protocol version introduced in InspIRCd v4.0a1. */ + PROTO_INSPIRCD_40_A1 = 1206, + /** The oldest version of the protocol that we support. */ PROTO_OLDEST = PROTO_INSPIRCD_30, /** The newest version of the protocol that we support. */ - PROTO_NEWEST = PROTO_INSPIRCD_30 + PROTO_NEWEST = PROTO_INSPIRCD_40_A1 }; /** Forward declarations diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index 925afac2e..bc08183af 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -112,7 +112,7 @@ class TreeSocket : public BufferedSocket TreeServer* MyRoot = NULL; /* Remote protocol version */ - unsigned int proto_version = 0; + uint16_t proto_version = 0; /** Checks if the given servername and sid are both free */ |
