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

Improve the error messages when an access list is full.

This commit is contained in:
Sadie Powell
2026-01-19 11:53:54 +00:00
parent 655c4fb5eb
commit 172f443421
5 changed files with 37 additions and 15 deletions
+7 -3
View File
@@ -190,10 +190,14 @@ class CommandCSFlags final
}
}
unsigned access_max = Config->GetModule("chanserv").Get<unsigned>("accessmax", "1000");
if (access_max && ci->GetDeepAccessCount() >= access_max)
const auto access_count = ci->GetDeepAccessCount();
const auto access_max = Config->GetModule("chanserv").Get<unsigned>("accessmax", "1000");
if (access_max && access_count >= access_max)
{
source.Reply(_("You can only have %d access entries on a channel, including access entries from other channels."), access_max);
if (access_count == ci->GetAccessCount())
source.Reply(access_max, CHAN_ACCESS_LIMIT, access_max);
else
source.Reply(access_max, CHAN_ACCESS_LIMIT_DEEP, access_max);
return;
}