diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-02-25 01:09:12 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-02-25 01:09:12 +0000 |
commit | 88b38f60d44ea0910d91b5f2b5c41fc39b7a1225 (patch) | |
tree | ec6b71dafdaa6fe2032c7797d83c712b73f5405e /src | |
parent | 0b6b0442cbf669715b72aeb8451cc1c6b6aebc54 (diff) |
Fixes and optimizations
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6612 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/hashcomp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index f927fbc99..53483c748 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -350,21 +350,21 @@ int irc::modestacker::GetStackedLine(std::deque<std::string> &result, int max_li result.push_back(adding ? "+" : "-"); if (sequence.size() > 1) - nextsize = sequence[1].length(); + nextsize = sequence[1].length() + 2; - while (!sequence[0].empty() && (sequence.size() > 1) && (result.size() < MAXMODES+1) && ((size+nextsize) < max_line_size)) + while (!sequence[0].empty() && (sequence.size() > 1) && (result.size() < MAXMODES+1) && ((size + nextsize) < max_line_size)) { result[0] += *(sequence[0].begin()); if (!sequence[1].empty()) { result.push_back(sequence[1]); - size += sequence[1].length() + 2; /* Account for mode character and whitespace */ + size += nextsize; /* Account for mode character and whitespace */ } sequence[0].erase(sequence[0].begin()); sequence.erase(sequence.begin() + 1); if (sequence.size() > 1) - nextsize = sequence[1].length(); + nextsize = sequence[1].length() + 2; n++; } |