summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlinuxdaemon <linuxdaemon@users.noreply.github.com>2019-01-24 09:52:59 -0600
committerPeter Powell <petpow@saberuk.com>2019-01-24 15:56:58 +0000
commit2f35b78fbaadb8d9a6c47ffc198bd97f91af3306 (patch)
tree17884c6995ed47fc54c2ad7ec461ccd31a796c99
parent1ab93cf7026d690f47dcd4af068049838ae92533 (diff)
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
-rw-r--r--src/modules/m_spanningtree/capab.cpp9
1 files changed, 9 insertions, 0 deletions
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;
}