]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/server.cpp
Optimize some behaviour in the core (#1476).
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / server.cpp
index bc43841c1cafefd4a9950605b9b91548413505f0..ecdad87f81797babf9e59337412a86786d97c71c 100644 (file)
@@ -19,6 +19,7 @@
 
 
 #include "inspircd.h"
+#include "modules/ssl.h"
 
 #include "main.h"
 #include "utils.h"
@@ -85,7 +86,7 @@ void CommandServer::HandleExtra(TreeServer* newserver, const std::vector<std::st
                }
 
                if (key == "burst")
-                       newserver->BeginBurst(ConvToUInt64(val));
+                       newserver->BeginBurst(ConvToNum<uint64_t>(val));
        }
 }
 
@@ -97,7 +98,6 @@ Link* TreeSocket::AuthRemote(const parameterlist& params)
                return NULL;
        }
 
-       irc::string servername = params[0].c_str();
        const std::string& sname = params[0];
        const std::string& password = params[1];
        const std::string& sid = params[3];
@@ -114,7 +114,7 @@ Link* TreeSocket::AuthRemote(const parameterlist& params)
        for (std::vector<reference<Link> >::iterator i = Utils->LinkBlocks.begin(); i < Utils->LinkBlocks.end(); i++)
        {
                Link* x = *i;
-               if (x->Name != servername && x->Name != "*") // open link allowance
+               if ((!stdalgo::string::equalsci(x->Name, sname)) && (x->Name != "*")) // open link allowance
                        continue;
 
                if (!ComparePass(*x, password))
@@ -127,6 +127,15 @@ Link* TreeSocket::AuthRemote(const parameterlist& params)
                        return NULL;
 
                ServerInstance->SNO->WriteToSnoMask('l',"Verified server connection " + linkID + " ("+description+")");
+
+               const SSLIOHook* const ssliohook = SSLIOHook::IsSSL(this);
+               if (ssliohook)
+               {
+                       std::string ciphersuite;
+                       ssliohook->GetCiphersuite(ciphersuite);
+                       ServerInstance->SNO->WriteToSnoMask('l', "Negotiated ciphersuite %s on link %s", ciphersuite.c_str(), x->Name.c_str());
+               }
+
                return x;
        }