X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree.cpp;h=604c081d8f6421dd4c3fdbad791d5cae04236abc;hb=f337934f333df779b9703eb5e7de2ddbd77535ce;hp=7a71df21ae224529c3c63771d90d7ad07729f947;hpb=344624dd2a81691df140c9d118901804ba766590;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 7a71df21a..604c081d8 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -714,7 +714,12 @@ class TreeSocket : public InspSocket } if (params[0] != this->MyCapabilities()) { - WriteOpers("*** \2ERROR\2: Server '%s' does not have the same set of modules loaded, cannot link!"); + std::string quitserver = this->myhost; + if (this->InboundServerName != "") + { + quitserver = this->InboundServerName; + } + WriteOpers("*** \2ERROR\2: Server '%s' does not have the same set of modules loaded, cannot link!",quitserver.c_str()); WriteOpers("*** Our networked module set is: '%s'",this->MyCapabilities().c_str()); WriteOpers("*** Other server's networked module set is: '%s'",params[0].c_str()); WriteOpers("*** These lists must match exactly on both servers. Please correct these errors, and try again."); @@ -1225,12 +1230,16 @@ class TreeSocket : public InspSocket char out[1024]; char result[1024]; log(DEBUG,"Original string '%s'",ret.c_str()); - int nbytes = from64tobits(out, ret.c_str(), 1024); - log(DEBUG,"m_spanningtree: decrypt %d bytes",nbytes); - ctx->Decrypt(out, result, nbytes, 0); - for (int t = 0; t < nbytes; t++) - if (result[t] == '\7') result[t] = 0; - ret = result; + /* ERROR is still allowed unencryped */ + if (ret.substr(0,7) != "ERROR :") + { + int nbytes = from64tobits(out, ret.c_str(), 1024); + log(DEBUG,"m_spanningtree: decrypt %d bytes",nbytes); + ctx->Decrypt(out, result, nbytes, 0); + for (int t = 0; t < nbytes; t++) + if (result[t] == '\7') result[t] = 0; + ret = result; + } } if (!this->ProcessLine(ret)) { @@ -2098,6 +2107,7 @@ class TreeSocket : public InspSocket { Squit(s,"Remote host closed the connection"); } + WriteOpers("Server '\2%s\2[%s]' closed the connection.",quitserver.c_str(),this->GetIP().c_str()); } virtual int OnIncomingConnection(int newsock, char* ip)