From 6c0361d0474f1db788c82306cca1d208309882c2 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 19 Oct 2006 07:26:05 +0000 Subject: Optimizations git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5499 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 71761000b..cc28bb2bf 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2097,16 +2097,21 @@ class TreeSocket : public InspSocket { ctx_in->Decrypt(out, result, nbytes, 0); for (int t = 0; t < nbytes; t++) - if (result[t] == '\7') result[t] = 0; + { + if (result[t] == '\7') + { + /* We only need to stick a \0 on the + * first \7, the rest will be lost + */ + result[t] = 0; + break; + } + } ret = result; } } } - if (!this->ProcessLine(ret)) - { - Instance->Log(DEBUG,"ProcessLine says no!"); - return false; - } + return this->ProcessLine(ret); } return true; } -- cgit v1.2.3