diff --git a/include/language.h b/include/language.h index de6cdb84d..9a1c9daf5 100644 --- a/include/language.h +++ b/include/language.h @@ -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:") diff --git a/language/anope.en_US.po b/language/anope.en_US.po index b7126bf19..eaa71f5fe 100644 --- a/language/anope.en_US.po +++ b/language/anope.en_US.po @@ -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 \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 "" diff --git a/modules/chanserv/cs_access.cpp b/modules/chanserv/cs_access.cpp index 3eff88b2a..8993cbc03 100644 --- a/modules/chanserv/cs_access.cpp +++ b/modules/chanserv/cs_access.cpp @@ -247,10 +247,14 @@ private: } } - unsigned access_max = Config->GetModule("chanserv").Get("accessmax", "1000"); - if (access_max && ci->GetDeepAccessCount() >= access_max) + const auto access_count = ci->GetDeepAccessCount(); + const auto access_max = Config->GetModule("chanserv").Get("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; } diff --git a/modules/chanserv/cs_flags.cpp b/modules/chanserv/cs_flags.cpp index 69b890109..7b19087df 100644 --- a/modules/chanserv/cs_flags.cpp +++ b/modules/chanserv/cs_flags.cpp @@ -190,10 +190,14 @@ class CommandCSFlags final } } - unsigned access_max = Config->GetModule("chanserv").Get("accessmax", "1000"); - if (access_max && ci->GetDeepAccessCount() >= access_max) + const auto access_count = ci->GetDeepAccessCount(); + const auto access_max = Config->GetModule("chanserv").Get("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; } diff --git a/modules/chanserv/cs_xop.cpp b/modules/chanserv/cs_xop.cpp index 7cfcb10dc..e785eacac 100644 --- a/modules/chanserv/cs_xop.cpp +++ b/modules/chanserv/cs_xop.cpp @@ -223,10 +223,14 @@ private: } } - unsigned access_max = Config->GetModule("chanserv").Get("accessmax", "1000"); - if (access_max && ci->GetDeepAccessCount() >= access_max) + const auto access_count = ci->GetDeepAccessCount(); + const auto access_max = Config->GetModule("chanserv").Get("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; }