mirror of
https://github.com/anope/anope.git
synced 2026-06-12 17:04:47 +02:00
Improve the error messages when an access list is full.
This commit is contained in:
@@ -137,6 +137,8 @@ namespace Language
|
||||
#define BOT_NOT_ASSIGNED _("You must assign a bot to the channel before using this command.")
|
||||
#define BOT_NOT_ON_CHANNEL _("Bot is not on channel \002%s\002.")
|
||||
|
||||
#define CHAN_ACCESS_LIMIT N_("You can only have %u access entry on a channel.", "You can only have %u access entries on a channel.")
|
||||
#define CHAN_ACCESS_LIMIT_DEEP N_("You can only have %u access entry on a channel, including access entries from other channels.", "You can only have %u access entries on a channel, including access entries from other channels.")
|
||||
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
|
||||
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
|
||||
#define CHAN_INFO_HEADER _("Information about channel \002%s\002:")
|
||||
|
||||
+14
-6
@@ -16,8 +16,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-12-14 01:24+0000\n"
|
||||
"PO-Revision-Date: 2025-12-14 01:24+0000\n"
|
||||
"POT-Creation-Date: 2026-01-19 11:28+0000\n"
|
||||
"PO-Revision-Date: 2026-01-19 11:28+0000\n"
|
||||
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
|
||||
"Language-Team: English\n"
|
||||
"Language: en_US\n"
|
||||
@@ -6189,10 +6189,6 @@ msgstr ""
|
||||
msgid "You can not send a single message while you have messages queued."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You can only have %d access entries on a channel, including access entries from other channels."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You can only have %d autokick masks on a channel."
|
||||
msgstr ""
|
||||
@@ -6201,6 +6197,18 @@ msgstr ""
|
||||
msgid "You can only have %d bad words entries on a channel."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "You can only have %u access entry on a channel, including access entries from other channels."
|
||||
msgid_plural "You can only have %u access entries on a channel, including access entries from other channels."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#, c-format
|
||||
msgid "You can only have %u access entry on a channel."
|
||||
msgid_plural "You can only have %u access entries on a channel."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#, c-format
|
||||
msgid "You can't %s yourself!"
|
||||
msgstr ""
|
||||
|
||||
@@ -247,10 +247,14 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -223,10 +223,14 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
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