1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 02:56:37 +02:00

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.
This commit is contained in:
Sadie Powell
2024-03-12 12:28:11 +00:00
parent 06add0e5fc
commit 54719fbfc6
3 changed files with 6 additions and 8 deletions
+2 -2
View File
@@ -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 = "-";