From 1b42e266426fd9aee439d024d787c7ba4a421c63 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 3 Sep 2013 19:40:03 -0400 Subject: Cap mode stacker max line length --- src/modes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modes.cpp') diff --git a/src/modes.cpp b/src/modes.cpp index 41c2ac663..55ce2b506 100644 --- a/src/modes.cpp +++ b/src/modes.cpp @@ -274,7 +274,7 @@ static std::list BuildModeStrings(StackerInfo *info) for (it = info->AddModes.begin(), it_end = info->AddModes.end(); it != it_end; ++it) { - if (++NModes > IRCD->MaxModes) + if (++NModes > IRCD->MaxModes || (buf.length() + parambuf.length() > IRCD->MaxLine - 100)) // Leave room for command, channel, etc { ret.push_back(buf + parambuf); buf = "+"; @@ -294,7 +294,7 @@ static std::list BuildModeStrings(StackerInfo *info) buf += "-"; for (it = info->DelModes.begin(), it_end = info->DelModes.end(); it != it_end; ++it) { - if (++NModes > IRCD->MaxModes) + if (++NModes > IRCD->MaxModes || (buf.length() + parambuf.length() > IRCD->MaxLine - 100)) // Leave room for command, channel, etc { ret.push_back(buf + parambuf); buf = "-"; -- cgit