From 88b38f60d44ea0910d91b5f2b5c41fc39b7a1225 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 25 Feb 2007 01:09:12 +0000 Subject: Fixes and optimizations git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6612 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/hashcomp.cpp | 8 ++++---- 1 file 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 &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++; } -- cgit v1.2.3