From: brain Date: Mon, 19 Dec 2005 15:03:21 +0000 (+0000) Subject: Fixed blank crap on end of lines X-Git-Tag: v2.0.23~9502 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=e63ddbab46fec6fa990e25af955c4ac3060be455;p=user%2Fhenk%2Fcode%2Finspircd.git Fixed blank crap on end of lines git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2572 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 9a5b13734..b7ef6d42d 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1169,6 +1169,8 @@ class TreeSocket : public InspSocket 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)) @@ -1193,7 +1195,7 @@ class TreeSocket : public InspSocket while (line.length() % this->keylength != 0) { // pad it to be a multiple of the key length - line = line + "\n"; + line = line + "\7"; } } ctx->Encrypt(line.c_str(), result, line.length(),0);