mirror of
https://github.com/anope/anope.git
synced 2026-06-12 17:24:49 +02:00
Move migration messages to cs_flags, split non-migratable and non-migrated.
This commit is contained in:
@@ -142,10 +142,6 @@ namespace Language
|
||||
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
|
||||
#define CHAN_ACCESS_MALFORMED _("You cannot add a malformed mask to an access list. Did you mean to add %s instead?")
|
||||
#define CHAN_ACCESS_FOREIGN N_("%u access entry from other access systems not shown; use \002%s\033ALL\002 to view all access entries.", "%u access entries from other access systems not shown; use \002%s\033ALL\002 to view all access entries.")
|
||||
#define CHAN_ACCESS_MIGRATED_1 _("\002%s\002 has been migrated to the %s access system.")
|
||||
#define CHAN_ACCESS_MIGRATED_N N_("\002%u\002 entry has been migrated to the %s access system.", "\002%u\002 entries have been migrated to the %s access system.")
|
||||
#define CHAN_ACCESS_NOT_MIGRATED_1 _("\002%s\002 can not be migrated to the %s access system because they have privileges that you do not or they have no migratable privileges.")
|
||||
#define CHAN_ACCESS_NOT_MIGRATED_N N_("\002%u\002 entry can not be migrated to the %s access system because they have privileges that you do not.", "\002%u\002 entries can not be migrated to the %s access system because they have privileges that you do not or they have no migratable privileges.")
|
||||
#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:")
|
||||
#define CHAN_LIMIT_EXCEEDED _("You have already exceeded your limit of \002%d\002 channels.")
|
||||
|
||||
+21
-9
@@ -16,8 +16,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-05-15 08:42+0100\n"
|
||||
"PO-Revision-Date: 2026-05-15 08:42+0100\n"
|
||||
"POT-Creation-Date: 2026-05-15 09:05+0100\n"
|
||||
"PO-Revision-Date: 2026-05-15 09:05+0100\n"
|
||||
"Last-Translator: Sadie Powell <sadie@sadiepowell.dev>\n"
|
||||
"Language-Team: English\n"
|
||||
"Language: en_US\n"
|
||||
@@ -129,9 +129,14 @@ msgstr ""
|
||||
msgid "%s already exists on the EXCEPTION list."
|
||||
msgstr ""
|
||||
|
||||
#: ../include/language.h
|
||||
#: ../modules/chanserv/cs_flags.cpp
|
||||
#, c-format
|
||||
msgid "%s can not be migrated to the %s access system because they have privileges that you do not or they have no migratable privileges."
|
||||
msgid "%s can not be migrated to the %s access system because they have no migratable privileges."
|
||||
msgstr ""
|
||||
|
||||
#: ../modules/chanserv/cs_flags.cpp
|
||||
#, c-format
|
||||
msgid "%s can not be migrated to the %s access system because they have privileges that you do not."
|
||||
msgstr ""
|
||||
|
||||
#: ../modules/botserv/bs_kick.cpp
|
||||
@@ -215,7 +220,7 @@ msgstr ""
|
||||
msgid "%s has been joined to %s."
|
||||
msgstr ""
|
||||
|
||||
#: ../include/language.h
|
||||
#: ../modules/chanserv/cs_flags.cpp
|
||||
#, c-format
|
||||
msgid "%s has been migrated to the %s access system."
|
||||
msgstr ""
|
||||
@@ -428,14 +433,21 @@ msgstr ""
|
||||
msgid "%s will now permanently be ignored."
|
||||
msgstr ""
|
||||
|
||||
#: ../include/language.h
|
||||
#: ../modules/chanserv/cs_flags.cpp
|
||||
#, c-format
|
||||
msgid "%u entry can not be migrated to the %s access system because they have privileges that you do not."
|
||||
msgid_plural "%u entries can not be migrated to the %s access system because they have privileges that you do not or they have no migratable privileges."
|
||||
msgid "%u entry can not be migrated to the %s access system because they have no migratable privileges."
|
||||
msgid_plural "%u entries can not be migrated to the %s access system because they have no migratable privileges."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../include/language.h
|
||||
#: ../modules/chanserv/cs_flags.cpp
|
||||
#, c-format
|
||||
msgid "%u entry can not be migrated to the %s access system because they have privileges that you do not."
|
||||
msgid_plural "%u entries can not be migrated to the %s access system because they have privileges that you do not."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../modules/chanserv/cs_flags.cpp
|
||||
#, c-format
|
||||
msgid "%u entry has been migrated to the %s access system."
|
||||
msgid_plural "%u entries have been migrated to the %s access system."
|
||||
|
||||
@@ -14,6 +14,13 @@
|
||||
|
||||
#include "module.h"
|
||||
|
||||
#define FLAGS_MIGRATED_1 _("\002%s\002 has been migrated to the %s access system.")
|
||||
#define FLAGS_MIGRATED_N N_("\002%u\002 entry has been migrated to the %s access system.", "\002%u\002 entries have been migrated to the %s access system.")
|
||||
#define FLAGS_NOT_MIGRATABLE_1 _("\002%s\002 can not be migrated to the %s access system because they have no migratable privileges.")
|
||||
#define FLAGS_NOT_MIGRATABLE_N N_("\002%u\002 entry can not be migrated to the %s access system because they have no migratable privileges.", "\002%u\002 entries can not be migrated to the %s access system because they have no migratable privileges.")
|
||||
#define FLAGS_NOT_MIGRATED_1 _("\002%s\002 can not be migrated to the %s access system because they have privileges that you do not.")
|
||||
#define FLAGS_NOT_MIGRATED_N N_("\002%u\002 entry can not be migrated to the %s access system because they have privileges that you do not.", "\002%u\002 entries can not be migrated to the %s access system because they have privileges that you do not.")
|
||||
|
||||
static std::map<Anope::string, char> defaultFlags;
|
||||
static Anope::map<Anope::string> migrationRequires;
|
||||
|
||||
@@ -414,8 +421,8 @@ class CommandCSFlags final
|
||||
auto override = false;
|
||||
const auto source_access = source.AccessFor(ci);
|
||||
|
||||
unsigned migrated = 0, notmigrated = 0;
|
||||
Anope::string migratedmask, notmigratedmask;
|
||||
unsigned migrated = 0, notmigratable = 0, notmigrated = 0;
|
||||
Anope::string migratedmask, notmigratablemask, notmigratedmask;
|
||||
const auto &entry = params.size() > 2 ? params[2] : "*";
|
||||
for (auto idx = ci->GetAccessCount(); idx > 0; --idx)
|
||||
{
|
||||
@@ -458,8 +465,8 @@ class CommandCSFlags final
|
||||
|
||||
if (newflags.empty())
|
||||
{
|
||||
notmigrated++;
|
||||
notmigratedmask = access->Mask();
|
||||
notmigratable++;
|
||||
notmigratablemask = access->Mask();
|
||||
Log(LOG_DEBUG) << access->Mask() << " has " << access->AccessSerialize() << " that can not be migrated to flags";
|
||||
continue; // No privs that are migratable
|
||||
}
|
||||
@@ -485,18 +492,23 @@ class CommandCSFlags final
|
||||
if (migrated == 1)
|
||||
{
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to migrate " << migratedmask;
|
||||
source.Reply(CHAN_ACCESS_MIGRATED_1, migratedmask.c_str(), source.command.nobreak().c_str());
|
||||
source.Reply(FLAGS_MIGRATED_1, migratedmask.c_str(), source.command.nobreak().c_str());
|
||||
}
|
||||
else if (migrated > 1)
|
||||
{
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to migrate " << migrated << " access entries";
|
||||
source.Reply(migrated, CHAN_ACCESS_MIGRATED_N, migrated, source.command.nobreak().c_str());
|
||||
source.Reply(migrated, FLAGS_MIGRATED_N, migrated, source.command.nobreak().c_str());
|
||||
}
|
||||
|
||||
if (notmigratable == 1)
|
||||
source.Reply(FLAGS_NOT_MIGRATABLE_1, notmigratablemask.c_str(), source.command.nobreak().c_str());
|
||||
else if (notmigratable > 1)
|
||||
source.Reply(notmigratable, FLAGS_NOT_MIGRATABLE_N, notmigratable, source.command.nobreak().c_str());
|
||||
|
||||
if (notmigrated == 1)
|
||||
source.Reply(CHAN_ACCESS_NOT_MIGRATED_1, notmigratedmask.c_str(), source.command.nobreak().c_str());
|
||||
source.Reply(FLAGS_NOT_MIGRATED_1, notmigratedmask.c_str(), source.command.nobreak().c_str());
|
||||
else if (notmigrated > 1)
|
||||
source.Reply(migrated, CHAN_ACCESS_NOT_MIGRATED_N, notmigrated, source.command.nobreak().c_str());
|
||||
source.Reply(notmigrated, FLAGS_NOT_MIGRATED_N, notmigrated, source.command.nobreak().c_str());
|
||||
}
|
||||
|
||||
void DoClear(CommandSource &source, ChannelInfo *ci)
|
||||
|
||||
Reference in New Issue
Block a user