summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-01-02 16:55:20 +0000
committerPeter Powell <petpow@saberuk.com>2019-01-02 16:56:25 +0000
commit93390f6ccbeeb5198217ef31a205c57e51d2dc18 (patch)
tree8247efed294fd006e008231cbc304ace7dbb10ac
parent8fd5f78f834e332aafd9959f2bbe23a4ff36b349 (diff)
Strip message tags when talking with 1202 protocol servers.
-rw-r--r--src/modules/m_spanningtree/compat.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp
index 7cd56b71c..17bc7cbc6 100644
--- a/src/modules/m_spanningtree/compat.cpp
+++ b/src/modules/m_spanningtree/compat.cpp
@@ -39,6 +39,12 @@ void TreeSocket::WriteLine(const std::string& original_line)
{
std::string line = original_line;
std::string::size_type a = line.find(' ');
+ if (line[0] == '@')
+ {
+ // The line contains tags which the 1202 protocol can't handle.
+ line.erase(0, a);
+ a = line.find(' ');
+ }
std::string::size_type b = line.find(' ', a + 1);
std::string command(line, a + 1, b-a-1);
// now try to find a translation entry