1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 02:03:12 +02:00

Add support for per-mode list limits.

This commit is contained in:
Sadie Powell
2021-06-04 02:12:09 +01:00
parent 3728a0bda1
commit e67c2d5632
4 changed files with 14 additions and 4 deletions
+2 -2
View File
@@ -336,7 +336,7 @@ class CommandCSMode : public Command
continue;
}
if (cm->type == MODE_LIST && ci->c && IRCD->GetMaxListFor(ci->c) && ci->c->HasMode(cm->name) >= IRCD->GetMaxListFor(ci->c))
if (cm->type == MODE_LIST && ci->c && IRCD->GetMaxListFor(ci->c, cm) && ci->c->HasMode(cm->name) >= IRCD->GetMaxListFor(ci->c, cm))
{
source.Reply(_("List for mode %c is full."), cm->mchar);
continue;
@@ -660,7 +660,7 @@ class CommandCSMode : public Command
if (adding)
{
if (IRCD->GetMaxListFor(ci->c) && ci->c->HasMode(cm->name) < IRCD->GetMaxListFor(ci->c))
if (IRCD->GetMaxListFor(ci->c, cm) && ci->c->HasMode(cm->name) < IRCD->GetMaxListFor(ci->c, cm))
ci->c->SetMode(NULL, cm, param);
}
else