summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-21 15:06:39 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-21 15:06:39 +0000
commitf337934f333df779b9703eb5e7de2ddbd77535ce (patch)
tree3e809c0df873516f92c3cc56f035209ed81b5ec8 /src
parent344624dd2a81691df140c9d118901804ba766590 (diff)
Added more verbose error output during link
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2600 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree.cpp24
1 files changed, 17 insertions, 7 deletions
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)