diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-16 18:56:20 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-16 18:56:20 +0000 |
commit | 0dd237c9a9d574537c6b19aeda18fbee08afe4cb (patch) | |
tree | 5ccd87840869488a9da9855e40d5cf9b37c9a590 /src/modules/m_spanningtree.cpp | |
parent | c5e529cfb9e5b9172d54da99ac9cb667dc025c2e (diff) |
Experimental speed improvement to sending encrypted lines
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3231 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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); |