mirror of
https://github.com/anope/anope.git
synced 2026-06-12 17:04:47 +02:00
Rework the output of nickserv/list.
* Add a new account name field to the output. * Remove the last mask field from the output. This is almost never useful nowadays. * Move the suspended and unconfirmed status to a new status field.
This commit is contained in:
+12
-18
@@ -16,8 +16,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-02-24 18:12+0000\n"
|
||||
"PO-Revision-Date: 2026-02-24 18:12+0000\n"
|
||||
"POT-Creation-Date: 2026-02-24 18:55+0000\n"
|
||||
"PO-Revision-Date: 2026-02-24 18:55+0000\n"
|
||||
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
|
||||
"Language-Team: English\n"
|
||||
"Language: en_US\n"
|
||||
@@ -417,15 +417,15 @@ msgstr ""
|
||||
msgid "{name}: {description}"
|
||||
msgstr ""
|
||||
|
||||
msgid "{nick}"
|
||||
msgstr ""
|
||||
|
||||
msgid "{nick} (last mask: {last_mask})"
|
||||
msgid "{nick} (account: {account})"
|
||||
msgstr ""
|
||||
|
||||
msgid "{nick} ({mask}) [{real_name}]"
|
||||
msgstr ""
|
||||
|
||||
msgid "{nick} -- {status} (account: {account})"
|
||||
msgstr ""
|
||||
|
||||
msgid "{nick}: registered on {registered}"
|
||||
msgstr ""
|
||||
|
||||
@@ -3387,9 +3387,6 @@ msgstr ""
|
||||
msgid "Language for %s changed to %s."
|
||||
msgstr ""
|
||||
|
||||
msgid "Last mask"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Last memo to %s has been cancelled."
|
||||
msgstr ""
|
||||
@@ -3565,9 +3562,6 @@ msgid ""
|
||||
"If the DISPLAY, NOEXPIRE, SUSPENDED, or UNCONFIRMED options are given only nicks which, respectively, are display nicks, will not expire, are suspended, or are unconfirmed will be shown. If multiple options are given, nicks must match every option to be shown. Note that these options are limited to Services Operators."
|
||||
msgstr ""
|
||||
|
||||
msgid "Lists all registered nicks owned by a user who last connected from the userhost foobar@example.com (case insensitive)."
|
||||
msgstr ""
|
||||
|
||||
msgid "Lists all registered nicks that are the display nickname for their account."
|
||||
msgstr ""
|
||||
|
||||
@@ -5209,6 +5203,9 @@ msgstr ""
|
||||
msgid "Statistics reset."
|
||||
msgstr ""
|
||||
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
msgid "Status updated (memos, vhost, chmodes, flags)."
|
||||
msgstr ""
|
||||
|
||||
@@ -5960,6 +5957,9 @@ msgstr ""
|
||||
msgid "Unassigns a bot from a channel. When you use this command, the bot won't join the channel anymore. However, bot configuration for the channel is kept, so you will always be able to reassign a bot later without having to reconfigure it entirely."
|
||||
msgstr ""
|
||||
|
||||
msgid "Unconfirmed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Underlines kicker"
|
||||
msgstr ""
|
||||
|
||||
@@ -6801,15 +6801,9 @@ msgstr ""
|
||||
msgid "[+expiry] channel reason"
|
||||
msgstr ""
|
||||
|
||||
msgid "[Hostname hidden]"
|
||||
msgstr ""
|
||||
|
||||
msgid "[Suspended]"
|
||||
msgstr ""
|
||||
|
||||
msgid "[Unconfirmed]"
|
||||
msgstr ""
|
||||
|
||||
msgid "[{pattern | channel} [INVISIBLE]]"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -67,12 +67,12 @@ public:
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn(_("Nick")).AddColumn(_("Last mask"));
|
||||
list.AddColumn(_("Nick")).AddColumn(_("Account")).AddColumn(_("Status"));
|
||||
list.SetFlexible([](ListFormatter::ListEntry &row)
|
||||
{
|
||||
return row["Last mask"].empty()
|
||||
? _("\002{nick}\002")
|
||||
: _("\002{nick}\002 (last mask: {last_mask})");
|
||||
return row["Status"].empty()
|
||||
? _("\002{nick}\002 (account: {account})")
|
||||
: _("\002{nick}\002 -- {status} (account: {account})");
|
||||
});
|
||||
|
||||
Anope::map<NickAlias *> ordered_map;
|
||||
@@ -96,11 +96,7 @@ public:
|
||||
else if (unconfirmed && !na->nc->HasExt("UNCONFIRMED"))
|
||||
continue;
|
||||
|
||||
/* We no longer compare the pattern against the output buffer.
|
||||
* Instead we build a nice nick!user@host buffer to compare.
|
||||
* The output is then generated separately. -TheShadow */
|
||||
Anope::string buf = Anope::Format("%s!%s", na->nick.c_str(), !na->last_userhost.empty() ? na->last_userhost.c_str() : "*@*");
|
||||
if (na->nick.equals_ci(pattern) || Anope::Match(buf, pattern, false, true))
|
||||
if (na->nick.equals_ci(pattern) || Anope::Match(na->nick, pattern, false, true))
|
||||
{
|
||||
if (((count + 1 >= from && count + 1 <= to) || (!from && !to)) && ++nnicks <= listmax)
|
||||
{
|
||||
@@ -110,14 +106,13 @@ public:
|
||||
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Nick"] = (isnoexpire ? "!" : "") + na->nick;
|
||||
if (na->nc->HasExt("HIDE_MASK") && !is_servadmin && na->nc != mync)
|
||||
entry["Last mask"] = Language::Translate(source.GetAccount(), _("[Hostname hidden]"));
|
||||
else if (na->nc->HasExt("NS_SUSPENDED"))
|
||||
entry["Last mask"] = Language::Translate(source.GetAccount(), _("[Suspended]"));
|
||||
entry["Account"] = na->nc->display;
|
||||
|
||||
auto &status = entry["Status"];
|
||||
if (na->nc->HasExt("NS_SUSPENDED"))
|
||||
status = Language::Translate(source.GetAccount(), _("Suspended"));
|
||||
else if (na->nc->HasExt("UNCONFIRMED"))
|
||||
entry["Last mask"] = Language::Translate(source.GetAccount(), _("[Unconfirmed]"));
|
||||
else
|
||||
entry["Last mask"] = is_servadmin ? na->last_userhost_real : na->last_userhost;
|
||||
status = Language::Translate(source.GetAccount(), _("Unconfirmed"));
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
++count;
|
||||
@@ -150,11 +145,7 @@ public:
|
||||
));
|
||||
|
||||
ExampleWrapper examples;
|
||||
examples.AddEntry("*!foobar@example.com", _(
|
||||
"Lists all registered nicks owned by a user who last connected from the userhost "
|
||||
"\037foobar@example.com\037 (case insensitive)."
|
||||
));
|
||||
examples.AddEntry("*Bot*!*@*", _(
|
||||
examples.AddEntry("*Bot*", _(
|
||||
"Lists all registered nicks with \037Bot\037 in their name (case insensitive)."
|
||||
));
|
||||
examples.AddEntry("#51-100", _(
|
||||
|
||||
Reference in New Issue
Block a user