diff options
author | Sadie Powell <sadie@witchery.services> | 2024-05-01 14:01:12 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-05-01 14:03:11 +0100 |
commit | 84ca4c0d2786903bc1ff7693cc5ce714d1cd6f2c (patch) | |
tree | 8b531af7d9b2df88d61a71848cd63086ff4d179c | |
parent | 1f9a197b188b49ac65580df996b7f8dd63a23240 (diff) |
Update the inspircd module for recent 1206 protocol changes.
-rw-r--r-- | modules/protocol/inspircd.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp index 6f8a1a431..65580c821 100644 --- a/modules/protocol/inspircd.cpp +++ b/modules/protocol/inspircd.cpp @@ -1592,7 +1592,10 @@ struct IRCDMessageCapab final if (!Servers::Capab.count("GLOBOPS")) Log() << "The remote server does not have the globops module; oper notices will be sent as announcements until the module is loaded."; - Uplink::Send("SERVER", Me->GetName(), GetPassword(), 0, Me->GetSID(), Me->GetDescription()); + if (spanningtree_proto_ver < 1206) + Uplink::Send("SERVER", Me->GetName(), GetPassword(), 0, Me->GetSID(), Me->GetDescription()); + else + Uplink::Send("SERVER", Me->GetName(), GetPassword(), Me->GetSID(), Me->GetDescription()); } } }; @@ -2285,18 +2288,18 @@ struct IRCDMessageServer final void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override { - if (!source.GetServer() && params.size() == 5) + size_t paramcount = spanningtree_proto_ver < 1206 ? 5 : 4; + if (!source.GetServer() && params.size() == paramcount) { /* * SERVER testnet.inspircd.org hunter7 0 123 :InspIRCd Test Network * 0: name * 1: pass - * 2: hops - * 3: numeric - * 4: desc + * 2: unused (v3 only) + * 3(2): numeric + * 4(3): desc */ - auto hops = Anope::Convert<unsigned>(params[2], 0); - new Server(Me, params[0], hops, params[4], params[3]); + new Server(Me, params[0], 0, params.back(), params[spanningtree_proto_ver < 1206 ? 3 : 2]); } else if (source.GetServer()) { |