From 1a91cdbcb0acd24b11185240be4f40ba4c8dfe5f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 9 Oct 2020 15:12:32 +0100 Subject: Add support for the 1206 spanningtree protocol. For now this is identical to 1205 but changes will be happening soon. --- src/modules/m_spanningtree/capab.cpp | 2 +- src/modules/m_spanningtree/main.h | 7 +++++-- src/modules/m_spanningtree/treesocket.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/modules') 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(params[1]); + proto_version = ConvToNum(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 */ -- cgit v1.3.1-10-gc9f91