]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/compat.cpp
Add ConfigTag::getDuration() with optional bounds checking
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / compat.cpp
index 9561442b5c4ac70bf1b625269ca2b7ab074976d2..41cabbc9397b0886b6801e8f03dfc4c37f4d2a4c 100644 (file)
@@ -30,7 +30,7 @@ void TreeSocket::WriteLine(std::string line)
        {
                if (line[0] != ':')
                {
-                       ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Sending line without server prefix!");
+                       ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Sending line without server prefix!");
                        line = ":" + ServerInstance->Config->GetSID() + " " + line;
                }
                if (proto_version != ProtocolVersion)
@@ -157,7 +157,7 @@ void TreeSocket::WriteLine(std::string line)
                }
        }
 
-       ServerInstance->Logs->Log("m_spanningtree", LOG_RAWIO, "S[%d] O %s", this->GetFd(), line.c_str());
+       ServerInstance->Logs->Log(MODNAME, LOG_RAWIO, "S[%d] O %s", this->GetFd(), line.c_str());
        this->WriteData(line);
        this->WriteData(newline);
 }
@@ -178,7 +178,7 @@ namespace
 
 bool TreeSocket::PreProcessOldProtocolMessage(User*& who, std::string& cmd, std::vector<std::string>& params)
 {
-       if ((cmd == "METADATA") && (params.size() >= 3))
+       if ((cmd == "METADATA") && (params.size() >= 3) && (params[0][0] == '#'))
        {
                // :20D METADATA #channel extname :extdata
                return InsertCurrentChannelTS(params);
@@ -212,7 +212,7 @@ bool TreeSocket::PreProcessOldProtocolMessage(User*& who, std::string& cmd, std:
                        if (!server)
                        {
                                // We've no idea what this is, log and stop processing
-                               ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Received a " + cmd + " with an unknown target: \"" + params[0] + "\", command dropped");
+                               ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Received a " + cmd + " with an unknown target: \"" + params[0] + "\", command dropped");
                                return false;
                        }
 
@@ -242,6 +242,10 @@ bool TreeSocket::PreProcessOldProtocolMessage(User*& who, std::string& cmd, std:
 
                params.swap(p);
        }
+       else if (cmd == "SVSMODE")
+       {
+               cmd = "MODE";
+       }
 
        return true; // Passthru
 }