diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-12 12:28:11 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-12 12:39:33 +0000 |
commit | 54719fbfc615b6632852b02327ecc2ed3f200a3e (patch) | |
tree | 4253f1ee30750245e35a7e97710a6c5504637892 /src/modes.cpp | |
parent | 06add0e5fc1b83b43014e731cb94229ab2be66f6 (diff) |
Allow protocol modules to declare that they have no line/mode limit.
InspIRCd allows us to send infinite length lines and mode changes
and will restack before sending to users.
Diffstat (limited to 'src/modes.cpp')
-rw-r--r-- | src/modes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modes.cpp b/src/modes.cpp index 8b2534268..b0fbf9cca 100644 --- a/src/modes.cpp +++ b/src/modes.cpp @@ -338,7 +338,7 @@ static auto BuildModeStrings(StackerInfo *info) for (it = info->AddModes.begin(), it_end = info->AddModes.end(); it != it_end; ++it) { - if (++NModes > IRCD->MaxModes || (buf.length() + paramlen > IRCD->MaxLine - 100)) // Leave room for command, channel, etc + if ((IRCD->MaxModes && ++NModes > IRCD->MaxModes) || (IRCD->MaxLine && buf.length() + paramlen > IRCD->MaxLine - 100)) // Leave room for command, channel, etc { ret.push_back({buf, parambuf}); buf = "+"; @@ -362,7 +362,7 @@ static auto BuildModeStrings(StackerInfo *info) buf += "-"; for (it = info->DelModes.begin(), it_end = info->DelModes.end(); it != it_end; ++it) { - if (++NModes > IRCD->MaxModes || (buf.length() + paramlen > IRCD->MaxLine - 100)) // Leave room for command, channel, etc + if ((IRCD->MaxModes && ++NModes > IRCD->MaxModes) || (IRCD->MaxLine && buf.length() + paramlen > IRCD->MaxLine - 100)) // Leave room for command, channel, etc { ret.push_back({buf, parambuf}); buf = "-"; |