]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/compat.cpp
Clean up duplicated link snomask messages on errors
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / compat.cpp
index 3724319b700c86ca73fcc5edf3793a57fea2b40e..b35879cd99bd81074bcea4ed9b70d85cda81db7c 100644 (file)
@@ -25,6 +25,7 @@ static const char* const forge_common_1201[] = {
        "m_sapart.so",
        "m_saquit.so",
        "m_setident.so",
+       "m_swhois.so",
 };
 
 static std::string wide_newline("\r\n");
@@ -33,6 +34,14 @@ void TreeSocket::CompatAddModules(std::vector<std::string>& modlist)
 {
        if (proto_version < 1202)
        {
+               for(std::vector<std::string>::iterator i = modlist.begin(); i != modlist.end(); ++i)
+               {
+                       if (*i == "m_halfop.so")
+                       {
+                               modlist.erase(i);
+                               break;
+                       }
+               }
                // you MUST have chgident loaded in order to be able to translate FIDENT
                modlist.push_back("m_chgident.so");
                for(int i=0; i * sizeof(char*) < sizeof(forge_common_1201); i++)
@@ -40,6 +49,9 @@ void TreeSocket::CompatAddModules(std::vector<std::string>& modlist)
                        if (ServerInstance->Modules->Find(forge_common_1201[i]))
                                modlist.push_back(forge_common_1201[i]);
                }
+               // module was merged
+               if (ServerInstance->Modules->Find("m_operchans.so"))
+                       modlist.push_back("m_operinvex.so");
        }
 }
 
@@ -69,7 +81,7 @@ void TreeSocket::WriteLine(std::string line)
                                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);
+                               line = ":" + ServerInstance->Config->GetSID() + " SVSNICK" + uid + line.substr(b);
                        }
                        else if (proto_version < 1202 && command == "AWAY")
                        {