From 0dd237c9a9d574537c6b19aeda18fbee08afe4cb Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 16 Feb 2006 18:56:20 +0000 Subject: Experimental speed improvement to sending encrypted lines git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3231 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/modules/m_spanningtree.cpp') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index f413b8529..92348148b 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1403,11 +1403,8 @@ class TreeSocket : public InspSocket char result64[10240]; if (this->keylength) { - while (line.length() % this->keylength != 0) - { - // pad it to be a multiple of the key length - line = line + "\7"; - } + // pad it to the key length + line.append(line.length() % this->keylength,'\7'); } unsigned int ll = line.length(); ctx_out->Encrypt(line.c_str(), result, ll, 1); -- cgit v1.2.3