]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/compat.cpp
modulemanger: check dependencies correctly
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / compat.cpp
index f278913c807cc14be3f3687845b933362e634ad6..8a6e6855ffbd7a047da5eeb9cb7f5d7ad77e50ce 100644 (file)
@@ -62,6 +62,21 @@ void TreeSocket::WriteLine(std::string line)
                                ServerInstance->Logs->Log("m_spanningtree",DEBUG,"Rewriting FIDENT for 1201-protocol server");
                                line = ":" + ServerInstance->Config->GetSID() + " CHGIDENT " +  line.substr(1,a-2) + line.substr(b);
                        }
+                       else if (proto_version < 1202 && command == "SAVE")
+                       {
+                               ServerInstance->Logs->Log("m_spanningtree",DEBUG,"Rewriting SAVE for 1201-protocol server");
+                               std::string::size_type c = line.find(' ', b + 1);
+                               std::string uid = line.substr(b, c - b);
+                               line = ":" + ServerInstance->Config->GetSID() + " SVSNICK " + uid + line.substr(b);
+                       }
+                       else if (proto_version < 1202 && command == "AWAY")
+                       {
+                               if (b != std::string::npos)
+                               {
+                                       std::string::size_type c = line.find(' ', b + 1);
+                                       line.erase(b,c-b);
+                               }
+                       }
                }
        }