summaryrefslogtreecommitdiff
path: root/src/modes.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-09-03 19:40:03 -0400
committerAdam <Adam@anope.org>2013-09-03 19:40:03 -0400
commit1b42e266426fd9aee439d024d787c7ba4a421c63 (patch)
treeb4c0a6c823108f0b2b3a6d5673200e57956a0abe /src/modes.cpp
parent46913511677b169f32d55e4fc96a8c236169ddc7 (diff)
Cap mode stacker max line length
Diffstat (limited to 'src/modes.cpp')
-rw-r--r--src/modes.cpp4
1 files changed, 2 insertions, 2 deletions
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<Anope::string> 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<Anope::string> 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 = "-";