summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-03-30 13:18:52 +0000
committerP. Powell <petpow@saberuk.com>2019-09-23 13:23:02 +0100
commit7045f206afc1fbac4c6687f4268c8c49ea5c0ca5 (patch)
tree3cb2477ce6ee48d5b55afbf9e46d77ddc12b53f5
parent67bd3e44c015b041a9a0ebbc2deb8369d72d9919 (diff)
Require the 1205 (3.0+) server protocol.
-rw-r--r--modules/protocol/inspircd3.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/protocol/inspircd3.cpp b/modules/protocol/inspircd3.cpp
index c49ed806f..c6a54315d 100644
--- a/modules/protocol/inspircd3.cpp
+++ b/modules/protocol/inspircd3.cpp
@@ -24,8 +24,6 @@ static std::list<SASLUser> saslusers;
static Anope::string rsquit_server, rsquit_id;
-static unsigned int spanningtree_proto_ver = 0;
-
class InspIRCd3Proto : public IRCDProto
{
private:
@@ -73,8 +71,8 @@ class InspIRCd3Proto : public IRCDProto
void SendConnect() anope_override
{
- UplinkSocket::Message() << "CAPAB START 1202";
- UplinkSocket::Message() << "CAPAB CAPABILITIES :PROTOCOL=1202 CASEMAPPING=" << Config->GetBlock("options")->Get<const Anope::string>("casemap", "ascii");
+ UplinkSocket::Message() << "CAPAB START 1205";
+ UplinkSocket::Message() << "CAPAB CAPABILITIES :CASEMAPPING=" << Config->GetBlock("options")->Get<const Anope::string>("casemap", "ascii");
UplinkSocket::Message() << "CAPAB END";
SendServer(Me);
}
@@ -770,10 +768,11 @@ struct IRCDMessageCapab : Message::Capab
{
if (params[0].equals_cs("START"))
{
+ unsigned int spanningtree_proto_ver = 0;
if (params.size() >= 2)
- spanningtree_proto_ver = (Anope::string(params[1]).is_pos_number_only() ? convertTo<unsigned>(params[1]) : 0);
+ spanningtree_proto_ver = params[1].is_pos_number_only() ? convertTo<unsigned>(params[1]) : 0;
- if (spanningtree_proto_ver < 1202)
+ if (spanningtree_proto_ver < 1205)
{
UplinkSocket::Message() << "ERROR :Protocol mismatch, no or invalid protocol version given in CAPAB START";
Anope::QuitReason = "Protocol mismatch, no or invalid protocol version given in CAPAB START";