From 2f35b78fbaadb8d9a6c47ffc198bd97f91af3306 Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Thu, 24 Jan 2019 09:52:59 -0600 Subject: Add translation for casemapping between 2.0/3.0 (#1544) If the casemapping is set to ascii, advertise the m_ascii module to 2.0 to allow use of the m_ascii extras module for 2.0 --- src/modules/m_spanningtree/capab.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index c29330516..ea11a917e 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -76,6 +76,15 @@ std::string TreeSocket::MyModules(int filter) capabilities.append(v.link_data); } } + + // If we are linked in a 2.0 server and have an ascii casemapping + // advertise it as m_ascii.so from inspircd-extras + if ((filter & VF_COMMON) && ServerInstance->Config->CaseMapping == "ascii" && proto_version == 1202) + { + if (!capabilities.empty()) + capabilities += "m_ascii.so"; + } + return capabilities; } -- cgit v1.2.3