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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user