mirror of
https://github.com/anope/anope.git
synced 2026-07-03 02:13:12 +02:00
Make column titles in listings translatable.
Make some more strings translatable, and remove some that don't need translation at all. Make expirytimes and units translatable. Make predefined messages in listings also translatable. Make the remaining command descriptions translatable. Make some ns/cs info strings equal to dedupe in translation file. Add missing no-autoop setting to cs info output. Make some strings translatable.
This commit is contained in:
@@ -190,7 +190,7 @@ class CommandBSBadwords : public Command
|
||||
ListFormatter list(source.GetAccount());
|
||||
BadWords *bw = ci->GetExt<BadWords>("badwords");
|
||||
|
||||
list.AddColumn("Number").AddColumn("Word").AddColumn("Type");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Word")).AddColumn(_("Type"));
|
||||
|
||||
if (!bw || !bw->GetBadWordCount())
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ class CommandBSBotList : public Command
|
||||
unsigned count = 0;
|
||||
ListFormatter list(source.GetAccount());
|
||||
|
||||
list.AddColumn("Nick").AddColumn("Mask");
|
||||
list.AddColumn(_("Nick")).AddColumn(_("Mask"));
|
||||
|
||||
for (botinfo_map::const_iterator it = BotListByNick->begin(), it_end = BotListByNick->end(); it != it_end; ++it)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ class CommandBSInfo : public Command
|
||||
source.Reply(_("Information for bot \002%s\002:"), bi->nick.c_str());
|
||||
info[_("Mask")] = bi->GetIdent() + "@" + bi->host;
|
||||
info[_("Real name")] = bi->realname;
|
||||
info[_("Created")] = Anope::strftime(bi->created);
|
||||
info[_("Created")] = Anope::strftime(bi->created, source.GetAccount());
|
||||
info[_("Options")] = bi->oper_only ? _("Private") : _("None");
|
||||
info[_("Used on")] = stringify(bi->GetChannelCount()) + " channel(s)";
|
||||
|
||||
|
||||
@@ -1184,9 +1184,9 @@ class BSKick : public Module
|
||||
info[_("AMSG kicker")] = disabled;
|
||||
|
||||
if (kd && kd->dontkickops)
|
||||
info.AddOption(_("Ops Protection"));
|
||||
info.AddOption(_("Ops protection"));
|
||||
if (kd && kd->dontkickvoices)
|
||||
info.AddOption(_("Voices Protection"));
|
||||
info.AddOption(_("Voices protection"));
|
||||
}
|
||||
|
||||
void OnPrivmsg(User *u, Channel *c, Anope::string &msg) anope_override
|
||||
|
||||
@@ -426,7 +426,7 @@ class CommandCSAccess : public Command
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Level").AddColumn("Mask");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Level")).AddColumn(_("Mask"));
|
||||
this->ProcessList(source, ci, params, list);
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ class CommandCSAccess : public Command
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Level").AddColumn("Mask").AddColumn("By").AddColumn("Last seen");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Level")).AddColumn(_("Mask")).AddColumn(_("By")).AddColumn(_("Last seen"));
|
||||
this->ProcessList(source, ci, params, list);
|
||||
}
|
||||
|
||||
@@ -661,7 +661,7 @@ class CommandCSLevels : public Command
|
||||
source.Reply(_("Access level settings for channel %s:"), ci->name.c_str());
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Name").AddColumn("Level");
|
||||
list.AddColumn(_("Name")).AddColumn(_("Level"));
|
||||
|
||||
const std::vector<Privilege> &privs = PrivilegeManager::GetPrivileges();
|
||||
|
||||
@@ -674,9 +674,9 @@ class CommandCSLevels : public Command
|
||||
entry["Name"] = p.name;
|
||||
|
||||
if (j == ACCESS_INVALID)
|
||||
entry["Level"] = "(disabled)";
|
||||
entry["Level"] = Language::Translate(source.GetAccount(), _("(disabled)"));
|
||||
else if (j == ACCESS_FOUNDER)
|
||||
entry["Level"] = "(founder only)";
|
||||
entry["Level"] = Language::Translate(source.GetAccount(), _("(founder only)"));
|
||||
else
|
||||
entry["Level"] = stringify(j);
|
||||
|
||||
@@ -755,7 +755,7 @@ class CommandCSLevels : public Command
|
||||
source.Reply(_("The following feature/function names are available:"));
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Name").AddColumn("Description");
|
||||
list.AddColumn(_("Name")).AddColumn(_("Description"));
|
||||
|
||||
const std::vector<Privilege> &privs = PrivilegeManager::GetPrivileges();
|
||||
for (unsigned i = 0; i < privs.size(); ++i)
|
||||
|
||||
@@ -257,11 +257,12 @@ class CommandCSAKick : public Command
|
||||
{
|
||||
class AkickListCallback : public NumberList
|
||||
{
|
||||
CommandSource &source;
|
||||
ListFormatter &list;
|
||||
ChannelInfo *ci;
|
||||
|
||||
public:
|
||||
AkickListCallback(ListFormatter &_list, ChannelInfo *_ci, const Anope::string &numlist) : NumberList(numlist, false), list(_list), ci(_ci)
|
||||
AkickListCallback(CommandSource &_source, ListFormatter &_list, ChannelInfo *_ci, const Anope::string &numlist) : NumberList(numlist, false), source(_source), list(_list), ci(_ci)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -274,11 +275,11 @@ class CommandCSAKick : public Command
|
||||
|
||||
Anope::string timebuf, lastused;
|
||||
if (akick->addtime)
|
||||
timebuf = Anope::strftime(akick->addtime, NULL, false);
|
||||
timebuf = Anope::strftime(akick->addtime, source.GetAccount(), false);
|
||||
else
|
||||
timebuf = UNKNOWN;
|
||||
if (akick->last_used)
|
||||
lastused = Anope::strftime(akick->last_used, NULL, false);
|
||||
lastused = Anope::strftime(akick->last_used, source.GetAccount(), false);
|
||||
else
|
||||
lastused = UNKNOWN;
|
||||
|
||||
@@ -295,7 +296,7 @@ class CommandCSAKick : public Command
|
||||
this->list.AddEntry(entry);
|
||||
}
|
||||
}
|
||||
nl_list(list, ci, mask);
|
||||
nl_list(source, list, ci, mask);
|
||||
nl_list.Process();
|
||||
}
|
||||
else
|
||||
@@ -314,11 +315,11 @@ class CommandCSAKick : public Command
|
||||
|
||||
Anope::string timebuf, lastused;
|
||||
if (akick->addtime)
|
||||
timebuf = Anope::strftime(akick->addtime);
|
||||
timebuf = Anope::strftime(akick->addtime, source.GetAccount());
|
||||
else
|
||||
timebuf = UNKNOWN;
|
||||
if (akick->last_used)
|
||||
lastused = Anope::strftime(akick->last_used);
|
||||
lastused = Anope::strftime(akick->last_used, source.GetAccount());
|
||||
else
|
||||
lastused = UNKNOWN;
|
||||
|
||||
@@ -361,7 +362,7 @@ class CommandCSAKick : public Command
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Mask").AddColumn("Reason");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("Reason"));
|
||||
this->ProcessList(source, ci, params, list);
|
||||
}
|
||||
|
||||
@@ -374,7 +375,7 @@ class CommandCSAKick : public Command
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Mask").AddColumn("Creator").AddColumn("Created").AddColumn("Last used").AddColumn("Reason");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("Creator")).AddColumn(_("Created")).AddColumn(_("Last used")).AddColumn(_("Reason"));
|
||||
this->ProcessList(source, ci, params, list);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class CommandCSDrop : public Command
|
||||
|
||||
if (params.size() < 2 || !chan.equals_ci(params[1]))
|
||||
{
|
||||
source.Reply(_("You must enter the channel name twice as a confirmation that you wish to drop \2%s\2."), chan.c_str());
|
||||
source.Reply(_("You must enter the channel name twice as a confirmation that you wish to drop \002%s\002."), chan.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ class CommandEntryMessage : public Command
|
||||
source.Reply(_("Entry message list for \002%s\002:"), ci->name.c_str());
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Creator").AddColumn("Created").AddColumn("Message");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Creator")).AddColumn(_("Created")).AddColumn(_("Message"));
|
||||
for (unsigned i = 0; i < (*messages)->size(); ++i)
|
||||
{
|
||||
EntryMsg *msg = (*messages)->at(i);
|
||||
@@ -118,7 +118,7 @@ class CommandEntryMessage : public Command
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Number"] = stringify(i + 1);
|
||||
entry["Creator"] = msg->creator;
|
||||
entry["Created"] = Anope::strftime(msg->when);
|
||||
entry["Created"] = Anope::strftime(msg->when, source.GetAccount());
|
||||
entry["Message"] = msg->message;
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
|
||||
@@ -249,9 +249,9 @@ class CommandCSFlags : public Command
|
||||
if (p != NULL)
|
||||
{
|
||||
if (add)
|
||||
source.Reply(_("Privilege \2%s\2 added to \2%s\2 on \2%s\2, new flags are +\2%s\2"), p->name.c_str(), access->mask.c_str(), ci->name.c_str(), access->AccessSerialize().c_str());
|
||||
source.Reply(_("Privilege \002%s\002 added to \002%s\002 on \002%s\002, new flags are +\002%s\002"), p->name.c_str(), access->mask.c_str(), ci->name.c_str(), access->AccessSerialize().c_str());
|
||||
else
|
||||
source.Reply(_("Privilege \2%s\2 removed from \2%s\2 on \2%s\2, new flags are +\2%s\2"), p->name.c_str(), access->mask.c_str(), ci->name.c_str(), access->AccessSerialize().c_str());
|
||||
source.Reply(_("Privilege \002%s\002 removed from \002%s\002 on \002%s\002, new flags are +\002%s\002"), p->name.c_str(), access->mask.c_str(), ci->name.c_str(), access->AccessSerialize().c_str());
|
||||
}
|
||||
else
|
||||
source.Reply(_("Flags for \002%s\002 on %s set to +\002%s\002"), access->mask.c_str(), ci->name.c_str(), access->AccessSerialize().c_str());
|
||||
@@ -269,7 +269,7 @@ class CommandCSFlags : public Command
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
|
||||
list.AddColumn("Number").AddColumn("Mask").AddColumn("Flags").AddColumn("Creator").AddColumn("Created");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("Flags")).AddColumn(_("Creator")).AddColumn(_("Created"));
|
||||
|
||||
unsigned count = 0;
|
||||
for (unsigned i = 0, end = ci->GetAccessCount(); i < end; ++i)
|
||||
|
||||
@@ -44,20 +44,20 @@ class CommandCSInfo : public Command
|
||||
|
||||
source.Reply(CHAN_INFO_HEADER, chan.c_str());
|
||||
if (ci->GetFounder())
|
||||
info["Founder"] = ci->GetFounder()->display;
|
||||
info[_("Founder")] = ci->GetFounder()->display;
|
||||
|
||||
if (show_all && ci->GetSuccessor())
|
||||
info["Successor"] = ci->GetSuccessor()->display;
|
||||
info[_("Successor")] = ci->GetSuccessor()->display;
|
||||
|
||||
if (!ci->desc.empty())
|
||||
info["Description"] = ci->desc;
|
||||
info[_("Description")] = ci->desc;
|
||||
|
||||
info["Registered"] = Anope::strftime(ci->time_registered);
|
||||
info["Last used"] = Anope::strftime(ci->last_used);
|
||||
info[_("Registered")] = Anope::strftime(ci->time_registered, source.GetAccount());
|
||||
info[_("Last used")] = Anope::strftime(ci->last_used, source.GetAccount());
|
||||
|
||||
if (show_all)
|
||||
{
|
||||
info["Ban type"] = stringify(ci->bantype);
|
||||
info[_("Ban type")] = stringify(ci->bantype);
|
||||
}
|
||||
|
||||
FOREACH_MOD(OnChanInfo, (source, ci, info, show_all));
|
||||
|
||||
@@ -71,7 +71,7 @@ class CommandCSList : public Command
|
||||
source.Reply(_("List of entries matching \002%s\002:"), pattern.c_str());
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Name").AddColumn("Description");
|
||||
list.AddColumn(_("Name")).AddColumn(_("Description"));
|
||||
|
||||
Anope::map<ChannelInfo *> ordered_map;
|
||||
for (registered_channel_map::const_iterator it = RegisteredChannelList->begin(), it_end = RegisteredChannelList->end(); it != it_end; ++it)
|
||||
@@ -99,7 +99,7 @@ class CommandCSList : public Command
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Name"] = (isnoexpire ? "!" : "") + ci->name;
|
||||
if (ci->HasExt("CS_SUSPENDED"))
|
||||
entry["Description"] = "[Suspended]";
|
||||
entry["Description"] = Language::Translate(source.GetAccount(), _("[Suspended]"));
|
||||
else
|
||||
entry["Description"] = ci->desc;
|
||||
list.AddEntry(entry);
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
else
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Service").AddColumn("Command").AddColumn("Method").AddColumn("");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Service")).AddColumn(_("Command")).AddColumn(_("Method")).AddColumn("");
|
||||
|
||||
for (unsigned i = 0; i < (*ls)->size(); ++i)
|
||||
{
|
||||
|
||||
@@ -423,7 +423,7 @@ class CommandCSMode : public Command
|
||||
else
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Mode").AddColumn("Param").AddColumn("Creator").AddColumn("Created");
|
||||
list.AddColumn(_("Mode")).AddColumn(_("Param")).AddColumn(_("Creator")).AddColumn(_("Created"));
|
||||
|
||||
for (ModeLocks::ModeList::const_iterator it = mlocks.begin(), it_end = mlocks.end(); it != it_end; ++it)
|
||||
{
|
||||
@@ -701,8 +701,8 @@ class CommandCSMode : public Command
|
||||
"on a channel.\n"
|
||||
" \n"
|
||||
"The \002%s LOCK\002 command allows you to add, delete, and view mode locks on a channel.\n"
|
||||
"If a mode is locked on or off, services will not allow that mode to be changed. The \2SET\2\n"
|
||||
"command will clear all existing mode locks and set the new one given, while \2ADD\2 and \2DEL\2\n"
|
||||
"If a mode is locked on or off, services will not allow that mode to be changed. The \002SET\002\n"
|
||||
"command will clear all existing mode locks and set the new one given, while \002ADD\002 and \002DEL\002\n"
|
||||
"modify the existing mode lock.\n"
|
||||
"Example:\n"
|
||||
" \002MODE #channel LOCK ADD +bmnt *!*@*aol*\002\n"
|
||||
@@ -812,9 +812,9 @@ class CommandCSModes : public Command
|
||||
if (!m.second.empty())
|
||||
{
|
||||
if (m.first)
|
||||
return Anope::printf(_("Gives you or the specified nick %s status on a channel"), m.second.c_str());
|
||||
return Anope::printf(Language::Translate(source.GetAccount(), _("Gives you or the specified nick %s status on a channel")), m.second.c_str());
|
||||
else
|
||||
return Anope::printf(_("Removes %s status from you or the specified nick on a channel"), m.second.c_str());
|
||||
return Anope::printf(Language::Translate(source.GetAccount(), _("Removes %s status from you or the specified nick on a channel")), m.second.c_str());
|
||||
}
|
||||
else
|
||||
return "";
|
||||
|
||||
@@ -1303,13 +1303,13 @@ class CSSet : public Module
|
||||
if (peace.HasExt(ci))
|
||||
info.AddOption(_("Peace"));
|
||||
if (restricted.HasExt(ci))
|
||||
info.AddOption(_("Restricted Access"));
|
||||
info.AddOption(_("Restricted access"));
|
||||
if (secure.HasExt(ci))
|
||||
info.AddOption(_("Security"));
|
||||
if (securefounder.HasExt(ci))
|
||||
info.AddOption(_("Secure Founder"));
|
||||
info.AddOption(_("Secure founder"));
|
||||
if (secureops.HasExt(ci))
|
||||
info.AddOption(_("Secure Ops"));
|
||||
info.AddOption(_("Secure ops"));
|
||||
if (signkick.HasExt(ci) || signkick_level.HasExt(ci))
|
||||
info.AddOption(_("Signed kicks"));
|
||||
if (persist.HasExt(ci))
|
||||
@@ -1318,10 +1318,12 @@ class CSSet : public Module
|
||||
info.AddOption(_("No expire"));
|
||||
if (keep_modes.HasExt(ci))
|
||||
info.AddOption(_("Keep modes"));
|
||||
if (noautoop.HasExt(ci))
|
||||
info.AddOption(_("No auto-op"));
|
||||
|
||||
time_t chanserv_expire = Config->GetModule(this)->Get<time_t>("expire", "14d");
|
||||
if (!noexpire.HasExt(ci) && chanserv_expire && !Anope::NoExpire)
|
||||
info["Expires on"] = Anope::strftime(ci->last_used + chanserv_expire);
|
||||
info[_("Expires")] = Anope::strftime(ci->last_used + chanserv_expire, source.GetAccount());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ class CommandCSSuspend : public Command
|
||||
|
||||
if (ci->HasExt("CS_SUSPENDED"))
|
||||
{
|
||||
source.Reply(_("\2%s\2 is already suspended."), ci->name.c_str());
|
||||
source.Reply(_("\002%s\002 is already suspended."), ci->name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -213,15 +213,15 @@ class CSSuspend : public Module
|
||||
CSSuspendInfo *si = suspend.Get(ci);
|
||||
if (si)
|
||||
{
|
||||
info["Suspended"] = "This channel is \2suspended\2.";
|
||||
info[_("Suspended")] = _("This channel is \002suspended\002.");
|
||||
if (!si->by.empty())
|
||||
info["Suspended by"] = si->by;
|
||||
info[_("Suspended by")] = si->by;
|
||||
if (!si->reason.empty())
|
||||
info["Suspend reason"] = si->reason;
|
||||
info[_("Suspend reason")] = si->reason;
|
||||
if (si->time)
|
||||
info["Suspended on"] = Anope::strftime(si->time, source.GetAccount(), true);
|
||||
info[_("Suspended on")] = Anope::strftime(si->time, source.GetAccount(), true);
|
||||
if (si->expires)
|
||||
info["Suspended expires"] = Anope::strftime(si->expires, source.GetAccount(), true);
|
||||
info[_("Suspension expires")] = Anope::strftime(si->expires, source.GetAccount(), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -248,16 +248,16 @@ class CSTopic : public Module
|
||||
void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_all) anope_override
|
||||
{
|
||||
if (keeptopic.HasExt(ci))
|
||||
info.AddOption(_("Topic Retention"));
|
||||
info.AddOption(_("Topic retention"));
|
||||
if (topiclock.HasExt(ci))
|
||||
info.AddOption(_("Topic Lock"));
|
||||
info.AddOption(_("Topic lock"));
|
||||
|
||||
ModeLocks *ml = ci->GetExt<ModeLocks>("modelocks");
|
||||
const ModeLock *secret = ml ? ml->GetMLock("SECRET") : NULL;
|
||||
if (!ci->last_topic.empty() && (show_all || ((!secret || secret->set == false) && (!ci->c || !ci->c->HasMode("SECRET")))))
|
||||
{
|
||||
info["Last topic"] = ci->last_topic;
|
||||
info["Topic set by"] = ci->last_topic_setter;
|
||||
info[_("Last topic")] = ci->last_topic;
|
||||
info[_("Topic set by")] = ci->last_topic_setter;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -379,7 +379,7 @@ class CommandCSXOP : public Command
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Mask");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask"));
|
||||
|
||||
if (!nick.empty() && nick.find_first_not_of("1234567890,-") == Anope::string::npos)
|
||||
{
|
||||
@@ -483,15 +483,15 @@ class CommandCSXOP : public Command
|
||||
public:
|
||||
CommandCSXOP(Module *modname) : Command(modname, "chanserv/xop", 2, 4)
|
||||
{
|
||||
this->SetSyntax("\037channel\037 ADD \037mask\037");
|
||||
this->SetSyntax("\037channel\037 DEL {\037mask\037 | \037entry-num\037 | \037list\037}");
|
||||
this->SetSyntax("\037channel\037 LIST [\037mask\037 | \037list\037]");
|
||||
this->SetSyntax("\037channel\037 CLEAR");
|
||||
this->SetSyntax(_("\037channel\037 ADD \037mask\037"));
|
||||
this->SetSyntax(_("\037channel\037 DEL {\037mask\037 | \037entry-num\037 | \037list\037}"));
|
||||
this->SetSyntax(_("\037channel\037 LIST [\037mask\037 | \037list\037]"));
|
||||
this->SetSyntax(_("\037channel\037 CLEAR"));
|
||||
}
|
||||
|
||||
const Anope::string GetDesc(CommandSource &source) const anope_override
|
||||
{
|
||||
return Anope::printf(_("Modify the list of %s users"), source.command.upper().c_str());
|
||||
return Anope::printf(Language::Translate(source.GetAccount(), _("Modify the list of %s users")), source.command.upper().c_str());
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
@@ -524,7 +524,7 @@ class CommandCSXOP : public Command
|
||||
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_("Maintains the \2%s list\2 for a channel. Users who match an access entry\n"
|
||||
source.Reply(_("Maintains the \002%s list\002 for a channel. Users who match an access entry\n"
|
||||
"on the %s list receive the following privileges:\n"
|
||||
" "), cmd.c_str(), cmd.c_str());
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class CommandHSList : public Command
|
||||
|
||||
unsigned display_counter = 0, listmax = Config->GetModule(this->owner)->Get<unsigned>("listmax", "50");
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Nick").AddColumn("Vhost").AddColumn("Creator").AddColumn("Created");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Nick")).AddColumn(_("Vhost")).AddColumn(_("Creator")).AddColumn(_("Created"));
|
||||
|
||||
for (nickalias_map::const_iterator it = NickAliasList->begin(), it_end = NickAliasList->end(); it != it_end; ++it)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ class CommandHSList : public Command
|
||||
else
|
||||
entry["Vhost"] = na->GetVhostHost();
|
||||
entry["Creator"] = na->GetVhostCreator();
|
||||
entry["Created"] = Anope::strftime(na->GetVhostCreated());
|
||||
entry["Created"] = Anope::strftime(na->GetVhostCreated(), source.GetAccount());
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class CommandHSList : public Command
|
||||
else
|
||||
entry["Vhost"] = na->GetVhostHost();
|
||||
entry["Creator"] = na->GetVhostCreator();
|
||||
entry["Created"] = Anope::strftime(na->GetVhostCreated());
|
||||
entry["Created"] = Anope::strftime(na->GetVhostCreated(), source.GetAccount());
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ class CommandHSWaiting : public Command
|
||||
unsigned display_counter = 0, listmax = Config->GetModule(this->owner)->Get<unsigned>("listmax");
|
||||
ListFormatter list(source.GetAccount());
|
||||
|
||||
list.AddColumn("Number").AddColumn("Nick").AddColumn("Vhost").AddColumn("Created");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Nick")).AddColumn(_("Vhost")).AddColumn(_("Created"));
|
||||
|
||||
for (nickalias_map::const_iterator it = NickAliasList->begin(), it_end = NickAliasList->end(); it != it_end; ++it)
|
||||
{
|
||||
@@ -317,7 +317,7 @@ class CommandHSWaiting : public Command
|
||||
entry["Vhost"] = hr->ident + "@" + hr->host;
|
||||
else
|
||||
entry["Vhost"] = hr->host;
|
||||
entry["Created"] = Anope::strftime(hr->time);
|
||||
entry["Created"] = Anope::strftime(hr->time, source.GetAccount());
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
++counter;
|
||||
@@ -329,7 +329,7 @@ class CommandHSWaiting : public Command
|
||||
for (unsigned i = 0; i < replies.size(); ++i)
|
||||
source.Reply(replies[i]);
|
||||
|
||||
source.Reply(_("Displayed \2%d\2 records (\2%d\2 total)."), display_counter, counter);
|
||||
source.Reply(_("Displayed \002%d\002 records (\002%d\002 total)."), display_counter, counter);
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
|
||||
@@ -46,9 +46,9 @@ class CommandMSCheck : public Command
|
||||
found = true; /* Yes, we've found the memo */
|
||||
|
||||
if (mi->GetMemo(i)->unread)
|
||||
source.Reply(_("The last memo you sent to %s (sent on %s) has not yet been read."), na->nick.c_str(), Anope::strftime(mi->GetMemo(i)->time).c_str());
|
||||
source.Reply(_("The last memo you sent to %s (sent on %s) has not yet been read."), na->nick.c_str(), Anope::strftime(mi->GetMemo(i)->time, source.GetAccount()).c_str());
|
||||
else
|
||||
source.Reply(_("The last memo you sent to %s (sent on %s) has been read."), na->nick.c_str(), Anope::strftime(mi->GetMemo(i)->time).c_str());
|
||||
source.Reply(_("The last memo you sent to %s (sent on %s) has been read."), na->nick.c_str(), Anope::strftime(mi->GetMemo(i)->time, source.GetAccount()).c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class CommandMSIgnore : public Command
|
||||
else
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Mask");
|
||||
list.AddColumn(_("Mask"));
|
||||
for (unsigned i = 0; i < mi->ignores.size(); ++i)
|
||||
{
|
||||
ListFormatter::ListEntry entry;
|
||||
|
||||
@@ -61,7 +61,7 @@ class CommandMSList : public Command
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
|
||||
list.AddColumn("Number").AddColumn("Sender").AddColumn("Date/Time");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Sender")).AddColumn(_("Date/Time"));
|
||||
|
||||
if (!param.empty() && isdigit(param[0]))
|
||||
{
|
||||
@@ -85,7 +85,7 @@ class CommandMSList : public Command
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Number"] = (m->unread ? "* " : " ") + stringify(number + 1);
|
||||
entry["Sender"] = m->sender;
|
||||
entry["Date/Time"] = Anope::strftime(m->time);
|
||||
entry["Date/Time"] = Anope::strftime(m->time, source.GetAccount());
|
||||
this->list.AddEntry(entry);
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,7 @@ class CommandMSList : public Command
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Number"] = (m->unread ? "* " : " ") + stringify(i + 1);
|
||||
entry["Sender"] = m->sender;
|
||||
entry["Date/Time"] = Anope::strftime(m->time);
|
||||
entry["Date/Time"] = Anope::strftime(m->time, source.GetAccount());
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +72,9 @@ class MemoListCallback : public NumberList
|
||||
return;
|
||||
|
||||
if (ci)
|
||||
source.Reply(_("Memo %d from %s (%s)."), index + 1, m->sender.c_str(), Anope::strftime(m->time).c_str());
|
||||
source.Reply(_("Memo %d from %s (%s)."), index + 1, m->sender.c_str(), Anope::strftime(m->time, source.GetAccount()).c_str());
|
||||
else
|
||||
source.Reply(_("Memo %d from %s (%s)."), index + 1, m->sender.c_str(), Anope::strftime(m->time).c_str());
|
||||
source.Reply(_("Memo %d from %s (%s)."), index + 1, m->sender.c_str(), Anope::strftime(m->time, source.GetAccount()).c_str());
|
||||
|
||||
BotInfo *bi;
|
||||
Anope::string cmd;
|
||||
|
||||
@@ -97,7 +97,7 @@ class CommandNSAJoin : public Command
|
||||
else
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Channel").AddColumn("Key");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Channel")).AddColumn(_("Key"));
|
||||
for (unsigned i = 0; i < (*channels)->size(); ++i)
|
||||
{
|
||||
AJoinEntry *aj = (*channels)->at(i);
|
||||
|
||||
@@ -45,7 +45,7 @@ class CommandNSAList : public Command
|
||||
ListFormatter list(source.GetAccount());
|
||||
int chan_count = 0;
|
||||
|
||||
list.AddColumn("Number").AddColumn("Channel").AddColumn("Access");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Channel")).AddColumn(_("Access"));
|
||||
|
||||
source.Reply(_("Channels that \002%s\002 has access on:"), nc->display.c_str());
|
||||
|
||||
@@ -55,7 +55,7 @@ class CommandNSAList : public Command
|
||||
|
||||
if (queue.empty())
|
||||
{
|
||||
source.Reply(_("\2%s\2 has no access in any channels."), nc->display.c_str());
|
||||
source.Reply(_("\002%s\002 has no access in any channels."), nc->display.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class CommandNSAList : public Command
|
||||
++chan_count;
|
||||
entry["Number"] = stringify(chan_count);
|
||||
entry["Channel"] = (ci->HasExt("CS_NO_EXPIRE") ? "!" : "") + ci->name;
|
||||
entry["Access"] = "Founder";
|
||||
entry["Access"] = Language::Translate(source.GetAccount(), _("Founder"));
|
||||
list.AddEntry(entry);
|
||||
continue;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ class CommandNSAList : public Command
|
||||
++chan_count;
|
||||
entry["Number"] = stringify(chan_count);
|
||||
entry["Channel"] = (ci->HasExt("CS_NO_EXPIRE") ? "!" : "") + ci->name;
|
||||
entry["Access"] = "Successor";
|
||||
entry["Access"] = Language::Translate(source.GetAccount(), _("Successor"));
|
||||
list.AddEntry(entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ class CommandNSCert : public Command
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Certificate");
|
||||
list.AddColumn(_("Certificate"));
|
||||
|
||||
for (unsigned i = 0; i < cl->GetCertCount(); ++i)
|
||||
{
|
||||
@@ -241,7 +241,7 @@ class CommandNSCert : public Command
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Certificate");
|
||||
list.AddColumn(_("Certificate"));
|
||||
|
||||
for (unsigned i = 0; i < cl->GetCertCount(); ++i)
|
||||
{
|
||||
@@ -260,9 +260,9 @@ class CommandNSCert : public Command
|
||||
public:
|
||||
CommandNSCert(Module *creator) : Command(creator, "nickserv/cert", 1, 2)
|
||||
{
|
||||
this->SetDesc("Modify the nickname client certificate list");
|
||||
this->SetSyntax("ADD \037fingerprint\037");
|
||||
this->SetSyntax("DEL \037fingerprint\037");
|
||||
this->SetDesc(_("Modify the nickname client certificate list"));
|
||||
this->SetSyntax(_("ADD \037fingerprint\037"));
|
||||
this->SetSyntax(_("DEL \037fingerprint\037"));
|
||||
this->SetSyntax("LIST");
|
||||
}
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ class CommandNSGList : public Command
|
||||
nc = source.GetAccount();
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Nick").AddColumn("Expires");
|
||||
list.AddColumn(_("Nick")).AddColumn(_("Expires"));
|
||||
time_t nickserv_expire = Config->GetModule("nickserv")->Get<time_t>("expire");
|
||||
for (unsigned i = 0; i < nc->aliases->size(); ++i)
|
||||
{
|
||||
@@ -304,7 +304,7 @@ class CommandNSGList : public Command
|
||||
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Nick"] = na2->nick;
|
||||
entry["Expires"] = (na2->HasExt("NS_NO_EXPIRE") || !nickserv_expire || Anope::NoExpire) ? "Does not expire" : ("expires in " + Anope::strftime(na2->last_seen + nickserv_expire));
|
||||
entry["Expires"] = (na2->HasExt("NS_NO_EXPIRE") || !nickserv_expire || Anope::NoExpire) ? "Does not expire" : Anope::strftime(na2->last_seen + nickserv_expire, source.GetAccount());
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ class CommandNSGList : public Command
|
||||
for (unsigned i = 0; i < replies.size(); ++i)
|
||||
source.Reply(replies[i]);
|
||||
|
||||
source.Reply(_("%d nicknames in the group."), nc->aliases->size());
|
||||
source.Reply(_("%d nickname(s) in the group."), nc->aliases->size());
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
|
||||
@@ -77,10 +77,10 @@ class CommandNSInfo : public Command
|
||||
info[_("Last seen address")] = na->last_realhost;
|
||||
}
|
||||
|
||||
info[_("Time registered")] = Anope::strftime(na->time_registered);
|
||||
info[_("Registered")] = Anope::strftime(na->time_registered, source.GetAccount());
|
||||
|
||||
if (!nick_online)
|
||||
info[_("Last seen")] = Anope::strftime(na->last_seen);
|
||||
info[_("Last seen")] = Anope::strftime(na->last_seen, source.GetAccount());
|
||||
|
||||
if (!na->last_quit.empty() && (show_hidden || !na->nc->HasExt("HIDE_QUIT")))
|
||||
info[_("Last quit message")] = na->last_quit;
|
||||
@@ -221,7 +221,7 @@ class CommandNSSASetHide : public CommandNSSetHide
|
||||
public:
|
||||
CommandNSSASetHide(Module *creator) : CommandNSSetHide(creator, "nickserv/saset/hide", 3)
|
||||
{
|
||||
this->SetSyntax("\037nickname\037 {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}");
|
||||
this->SetSyntax(_("\037nickname\037 {EMAIL | STATUS | USERMASK | QUIT} {ON | OFF}"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
|
||||
@@ -72,7 +72,7 @@ class CommandNSList : public Command
|
||||
mync = source.nc;
|
||||
ListFormatter list(source.GetAccount());
|
||||
|
||||
list.AddColumn("Nick").AddColumn("Last usermask");
|
||||
list.AddColumn(_("Nick")).AddColumn(_("Last usermask"));
|
||||
|
||||
Anope::map<NickAlias *> ordered_map;
|
||||
for (nickalias_map::const_iterator it = NickAliasList->begin(), it_end = NickAliasList->end(); it != it_end; ++it)
|
||||
@@ -107,11 +107,11 @@ class CommandNSList : public Command
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Nick"] = (isnoexpire ? "!" : "") + na->nick;
|
||||
if (na->nc->HasExt("HIDE_MASK") && !is_servadmin && na->nc != mync)
|
||||
entry["Last usermask"] = "[Hostname hidden]";
|
||||
entry["Last usermask"] = Language::Translate(source.GetAccount(), _("[Hostname hidden]"));
|
||||
else if (na->nc->HasExt("NS_SUSPENDED"))
|
||||
entry["Last usermask"] = "[Suspended]";
|
||||
entry["Last usermask"] = Language::Translate(source.GetAccount(), _("[Suspended]"));
|
||||
else if (na->nc->HasExt("UNCONFIRMED"))
|
||||
entry["Last usermask"] = "[Unconfirmed]";
|
||||
entry["Last usermask"] = Language::Translate(source.GetAccount(), _("[Unconfirmed]"));
|
||||
else
|
||||
entry["Last usermask"] = na->last_usermask;
|
||||
list.AddEntry(entry);
|
||||
|
||||
@@ -127,7 +127,7 @@ class CommandNSRecover : public Command
|
||||
CommandNSRecover(Module *creator) : Command(creator, "nickserv/recover", 1, 2)
|
||||
{
|
||||
this->SetDesc(_("Regains control of your nick"));
|
||||
this->SetSyntax("\037nickname\037 [\037password\037]");
|
||||
this->SetSyntax(_("\037nickname\037 [\037password\037]"));
|
||||
this->AllowUnregistered(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ class CommandNSRegister : public Command
|
||||
Anope::string cmd;
|
||||
if (Command::FindCommandFromService("nickserv/confirm", bi, cmd))
|
||||
source.Reply(_("A passcode has been sent to %s, please type \002%s%s %s <passcode>\002 to confirm your email address."), email.c_str(), Config->StrictPrivmsg.c_str(), bi->nick.c_str(), cmd.c_str());
|
||||
source.Reply(_("If you do not confirm your email address within %s your account will expire."), Anope::Duration(unconfirmed_expire).c_str());
|
||||
source.Reply(_("If you do not confirm your email address within %s your account will expire."), Anope::Duration(unconfirmed_expire, source.GetAccount()).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,7 +368,7 @@ class NSRegister : public Module
|
||||
time_t time_registered = Anope::CurTime - this_na->time_registered;
|
||||
time_t unconfirmed_expire = Config->GetModule(this)->Get<time_t>("unconfirmedexpire", "1d");
|
||||
if (unconfirmed_expire > time_registered)
|
||||
u->SendMessage(NickServ, _("Your account will expire, if not confirmed, in %s"), Anope::Duration(unconfirmed_expire - time_registered).c_str());
|
||||
u->SendMessage(NickServ, _("Your account will expire, if not confirmed, in %s"), Anope::Duration(unconfirmed_expire - time_registered, u->Account()).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class CommandNSSuspend : public Command
|
||||
|
||||
if (na->nc->HasExt("NS_SUSPENDED"))
|
||||
{
|
||||
source.Reply(_("\2%s\2 is already suspended."), na->nc->display.c_str());
|
||||
source.Reply(_("\002%s\002 is already suspended."), na->nc->display.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -217,15 +217,15 @@ class NSSuspend : public Module
|
||||
NSSuspendInfo *s = suspend.Get(na->nc);
|
||||
if (s)
|
||||
{
|
||||
info["Suspended"] = "This nickname is \2suspended\2.";
|
||||
info[_("Suspended")] = _("This nickname is \002suspended\002.");
|
||||
if (!s->by.empty())
|
||||
info["Suspended by"] = s->by;
|
||||
info[_("Suspended by")] = s->by;
|
||||
if (!s->reason.empty())
|
||||
info["Suspend reason"] = s->reason;
|
||||
info[_("Suspend reason")] = s->reason;
|
||||
if (s->when)
|
||||
info["Suspended on"] = Anope::strftime(s->when, source.GetAccount(), true);
|
||||
info[_("Suspended on")] = Anope::strftime(s->when, source.GetAccount(), true);
|
||||
if (s->expires)
|
||||
info["Suspended expires"] = Anope::strftime(s->expires, source.GetAccount(), true);
|
||||
info[_("Suspension expires")] = Anope::strftime(s->expires, source.GetAccount(), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ class CommandOSAKill : public Command
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Mask").AddColumn("Reason");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("Reason"));
|
||||
|
||||
this->ProcessList(source, params, list);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ class CommandOSAKill : public Command
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Mask").AddColumn("Creator").AddColumn("Created").AddColumn("Expires").AddColumn("Reason");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("Creator")).AddColumn(_("Created")).AddColumn(_("Expires")).AddColumn(_("Reason"));
|
||||
|
||||
this->ProcessList(source, params, list);
|
||||
}
|
||||
@@ -367,7 +367,7 @@ class CommandOSAKill : public Command
|
||||
this->SetSyntax(_("DEL {\037mask\037 | \037entry-num\037 | \037list\037 | \037id\037}"));
|
||||
this->SetSyntax(_("LIST [\037mask\037 | \037list\037 | \037id\037]"));
|
||||
this->SetSyntax(_("VIEW [\037mask\037 | \037list\037 | \037id\037]"));
|
||||
this->SetSyntax(_("CLEAR"));
|
||||
this->SetSyntax("CLEAR");
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
|
||||
@@ -54,7 +54,7 @@ class CommandOSConfig : public Command
|
||||
continue;
|
||||
|
||||
ListFormatter lflist(source.GetAccount());
|
||||
lflist.AddColumn("Name").AddColumn("Value");
|
||||
lflist.AddColumn(_("Name")).AddColumn(_("Value"));
|
||||
|
||||
for (Configuration::Block::item_map::const_iterator it = items->begin(), it_end = items->end(); it != it_end; ++it)
|
||||
{
|
||||
|
||||
@@ -214,7 +214,7 @@ class CommandOSDNS : public Command
|
||||
}
|
||||
|
||||
ListFormatter lf(source.GetAccount());
|
||||
lf.AddColumn("Server").AddColumn("IP").AddColumn("Limit").AddColumn("State");
|
||||
lf.AddColumn(_("Server")).AddColumn(_("IP")).AddColumn(_("Limit")).AddColumn(_("State"));
|
||||
for (unsigned i = 0; i < dns_servers->size(); ++i)
|
||||
{
|
||||
DNSServer *s = dns_servers->at(i);
|
||||
@@ -222,7 +222,7 @@ class CommandOSDNS : public Command
|
||||
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Server"] = s->GetName();
|
||||
entry["Limit"] = s->GetLimit() ? stringify(s->GetLimit()) : "None";
|
||||
entry["Limit"] = s->GetLimit() ? stringify(s->GetLimit()) : Language::Translate(source.GetAccount(), _("None"));
|
||||
|
||||
Anope::string ip_str;
|
||||
for (unsigned j = 0; j < s->GetIPs().size(); ++j)
|
||||
@@ -233,13 +233,13 @@ class CommandOSDNS : public Command
|
||||
entry["IP"] = ip_str;
|
||||
|
||||
if (!srv)
|
||||
entry["State"] = "Split";
|
||||
entry["State"] = Language::Translate(source.GetAccount(), _("Split"));
|
||||
else if (s->Active())
|
||||
entry["State"] = "Pooled/Active";
|
||||
entry["State"] = Language::Translate(source.GetAccount(), _("Pooled/Active"));
|
||||
else if (s->Pooled())
|
||||
entry["State"] = "Pooled/Not Active";
|
||||
entry["State"] = Language::Translate(source.GetAccount(), _("Pooled/Not Active"));
|
||||
else
|
||||
entry["State"] = "Unpooled";
|
||||
entry["State"] = Language::Translate(source.GetAccount(), _("Unpooled"));
|
||||
|
||||
lf.AddEntry(entry);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ class CommandOSDNS : public Command
|
||||
if (!zones->empty())
|
||||
{
|
||||
ListFormatter lf2(source.GetAccount());
|
||||
lf2.AddColumn("Zone").AddColumn("Servers");
|
||||
lf2.AddColumn(_("Zone")).AddColumn(_("Servers"));
|
||||
|
||||
for (unsigned i = 0; i < zones->size(); ++i)
|
||||
{
|
||||
|
||||
@@ -94,7 +94,7 @@ class CommandOSForbid : public Command
|
||||
this->SetDesc(_("Forbid usage of nicknames, channels, and emails"));
|
||||
this->SetSyntax(_("ADD {NICK|CHAN|EMAIL|REGISTER} [+\037expiry\037] \037entry\037\002 \037reason\037"));
|
||||
this->SetSyntax(_("DEL {NICK|CHAN|EMAIL|REGISTER} \037entry\037"));
|
||||
this->SetSyntax(_("LIST (NICK|CHAN|EMAIL|REGISTER)"));
|
||||
this->SetSyntax("LIST (NICK|CHAN|EMAIL|REGISTER)");
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
@@ -171,7 +171,7 @@ class CommandOSForbid : public Command
|
||||
this->fs->AddForbid(d);
|
||||
|
||||
Log(LOG_ADMIN, source, this) << "to add a forbid on " << entry << " of type " << subcommand;
|
||||
source.Reply(_("Added a forbid on %s to expire on %s."), entry.c_str(), d->expires ? Anope::strftime(d->expires).c_str() : "never");
|
||||
source.Reply(_("Added a forbid on %s to expire on %s."), entry.c_str(), d->expires ? Anope::strftime(d->expires, source.GetAccount()).c_str() : "never");
|
||||
|
||||
/* apply forbid */
|
||||
switch (ftype)
|
||||
@@ -197,7 +197,7 @@ class CommandOSForbid : public Command
|
||||
delete na;
|
||||
}
|
||||
|
||||
source.Reply(_("\2%d\2 nicknames dropped."), na_matches);
|
||||
source.Reply(_("\002%d\002 nicknames dropped."), na_matches);
|
||||
break;
|
||||
}
|
||||
case FT_CHAN:
|
||||
@@ -259,7 +259,7 @@ class CommandOSForbid : public Command
|
||||
delete ci;
|
||||
}
|
||||
|
||||
source.Reply(_("\2%d\2 channels cleared, and \2%d\2 channels dropped."), chan_matches, ci_matches);
|
||||
source.Reply(_("\002%d\002 channels cleared, and \002%d\002 channels dropped."), chan_matches, ci_matches);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -290,7 +290,7 @@ class CommandOSForbid : public Command
|
||||
else
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Mask").AddColumn("Type").AddColumn("Reason");
|
||||
list.AddColumn(_("Mask")).AddColumn(_("Type")).AddColumn(_("Reason"));
|
||||
|
||||
for (unsigned i = 0; i < forbids.size(); ++i)
|
||||
{
|
||||
@@ -312,7 +312,7 @@ class CommandOSForbid : public Command
|
||||
entry["Mask"] = d->mask;
|
||||
entry["Type"] = stype;
|
||||
entry["Creator"] = d->creator;
|
||||
entry["Expires"] = d->expires ? Anope::strftime(d->expires).c_str() : "never";
|
||||
entry["Expires"] = d->expires ? Anope::strftime(d->expires, source.GetAccount()).c_str() : "never";
|
||||
entry["Reason"] = d->reason;
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ class CommandOSIgnore : public Command
|
||||
else
|
||||
{
|
||||
source.Reply(_("\002%s\002 will now be ignored for \002%s\002."), nick.c_str(), Anope::Duration(t, source.GetAccount()).c_str());
|
||||
Log(LOG_ADMIN, source, this) << "to add an ignore on " << nick << " for " << Anope::Duration(t, source.GetAccount());
|
||||
Log(LOG_ADMIN, source, this) << "to add an ignore on " << nick << " for " << Anope::Duration(t);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ class CommandOSIgnore : public Command
|
||||
else
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Mask").AddColumn("Creator").AddColumn("Reason").AddColumn("Expires");
|
||||
list.AddColumn(_("Mask")).AddColumn(_("Creator")).AddColumn(_("Reason")).AddColumn(_("Expires"));
|
||||
for (std::list<IgnoreData>::const_iterator ign = ignores.begin(), ign_end = ignores.end(); ign != ign_end; ++ign)
|
||||
{
|
||||
const IgnoreData &ignore = *ign;
|
||||
@@ -218,7 +218,7 @@ class CommandOSIgnore : public Command
|
||||
entry["Mask"] = ignore.mask;
|
||||
entry["Creator"] = ignore.creator;
|
||||
entry["Reason"] = ignore.reason;
|
||||
entry["Expires"] = Anope::strftime(ignore.time);
|
||||
entry["Expires"] = Anope::strftime(ignore.time, source.GetAccount());
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
|
||||
@@ -268,8 +268,8 @@ class CommandOSIgnore : public Command
|
||||
this->SetDesc(_("Modify the Services ignore list"));
|
||||
this->SetSyntax(_("ADD \037time\037 {\037nick\037|\037mask\037} [\037reason\037]"));
|
||||
this->SetSyntax(_("DEL {\037nick\037|\037mask\037}"));
|
||||
this->SetSyntax(_("LIST"));
|
||||
this->SetSyntax(_("CLEAR"));
|
||||
this->SetSyntax("LIST");
|
||||
this->SetSyntax("CLEAR");
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
|
||||
@@ -144,7 +144,7 @@ class CommandOSInfo : public Command
|
||||
|
||||
if ((*oi)->size() >= Config->GetModule(this->module)->Get<unsigned>("max", "10"))
|
||||
{
|
||||
source.Reply(_("The oper info list for \2%s\2 is full."), target.c_str());
|
||||
source.Reply(_("The oper info list for \002%s\002 is full."), target.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -154,14 +154,14 @@ class CommandOSInfo : public Command
|
||||
|
||||
if (o->info.equals_ci(info))
|
||||
{
|
||||
source.Reply(_("The oper info already exists on \2%s\2."), target.c_str());
|
||||
source.Reply(_("The oper info already exists on \002%s\002."), target.c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
(*oi)->push_back(new OperInfo(target, info, source.GetNick(), Anope::CurTime));
|
||||
|
||||
source.Reply(_("Added info to \2%s\2."), target.c_str());
|
||||
source.Reply(_("Added info to \002%s\002."), target.c_str());
|
||||
Log(LOG_ADMIN, source, this) << "to add information to " << target;
|
||||
}
|
||||
else if (cmd.equals_ci("DEL"))
|
||||
@@ -176,7 +176,7 @@ class CommandOSInfo : public Command
|
||||
|
||||
if (!oi)
|
||||
{
|
||||
source.Reply(_("Oper info list for \2%s\2 is empty."), target.c_str());
|
||||
source.Reply(_("Oper info list for \002%s\002 is empty."), target.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -195,14 +195,14 @@ class CommandOSInfo : public Command
|
||||
|
||||
if (!found)
|
||||
{
|
||||
source.Reply(_("No such info \"%s\" on \2%s\2."), info.c_str(), target.c_str());
|
||||
source.Reply(_("No such info \"%s\" on \002%s\002."), info.c_str(), target.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((*oi)->empty())
|
||||
e->Shrink<OperInfos>("operinfo");
|
||||
|
||||
source.Reply(_("Deleted info from \2%s\2."), target.c_str());
|
||||
source.Reply(_("Deleted info from \002%s\002."), target.c_str());
|
||||
Log(LOG_ADMIN, source, this) << "to remove information from " << target;
|
||||
}
|
||||
}
|
||||
@@ -212,13 +212,13 @@ class CommandOSInfo : public Command
|
||||
|
||||
if (!oi)
|
||||
{
|
||||
source.Reply(_("Oper info list for \2%s\2 is empty."), target.c_str());
|
||||
source.Reply(_("Oper info list for \002%s\002 is empty."), target.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
e->Shrink<OperInfos>("operinfo");
|
||||
|
||||
source.Reply(_("Cleared info from \2%s\2"), target.c_str());
|
||||
source.Reply(_("Cleared info from \002%s\002."), target.c_str());
|
||||
Log(LOG_ADMIN, source, this) << "to clear information for " << target;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -39,7 +39,7 @@ class CommandOSChanList : public Command
|
||||
}
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Name").AddColumn("Users").AddColumn("Modes").AddColumn("Topic");
|
||||
list.AddColumn(_("Name")).AddColumn(_("Users")).AddColumn(_("Modes")).AddColumn(_("Topic"));
|
||||
|
||||
if (!pattern.empty() && (u2 = User::Find(pattern, true)))
|
||||
{
|
||||
@@ -144,7 +144,7 @@ class CommandOSUserList : public Command
|
||||
modes.insert("INVIS");
|
||||
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Name").AddColumn("Mask");
|
||||
list.AddColumn(_("Name")).AddColumn(_("Mask"));
|
||||
|
||||
if (!pattern.empty() && (c = Channel::Find(pattern)))
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ class CommandOSLogin : public Command
|
||||
|
||||
const Anope::string GetDesc(CommandSource &source) const anope_override
|
||||
{
|
||||
return Anope::printf(_("Login to %s"), source.service->nick.c_str());
|
||||
return Anope::printf(Language::Translate(source.GetAccount(), _("Login to %s")), source.service->nick.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -100,7 +100,7 @@ class CommandOSLogout : public Command
|
||||
|
||||
const Anope::string GetDesc(CommandSource &source) const anope_override
|
||||
{
|
||||
return Anope::printf(_("Logout from %s"), source.service->nick.c_str());
|
||||
return Anope::printf(Language::Translate(source.GetAccount(), _("Logout from %s")), source.service->nick.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class CommandOSModInfo : public Command
|
||||
Module *m = ModuleManager::FindModule(file);
|
||||
if (m)
|
||||
{
|
||||
source.Reply(_("Module: \002%s\002 Version: \002%s\002 Author: \002%s\002 Loaded: \002%s\002"), m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "Unknown", Anope::strftime(m->created).c_str());
|
||||
source.Reply(_("Module: \002%s\002 Version: \002%s\002 Author: \002%s\002 Loaded: \002%s\002"), m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "Unknown", Anope::strftime(m->created, source.GetAccount()).c_str());
|
||||
if (Anope::Debug)
|
||||
source.Reply(_(" Loaded at: %p"), m->handle);
|
||||
|
||||
|
||||
@@ -114,14 +114,14 @@ class NewsBase : public Command
|
||||
else
|
||||
{
|
||||
ListFormatter lflist(source.GetAccount());
|
||||
lflist.AddColumn("Number").AddColumn("Creator").AddColumn("Created").AddColumn("Text");
|
||||
lflist.AddColumn(_("Number")).AddColumn(_("Creator")).AddColumn(_("Created")).AddColumn(_("Text"));
|
||||
|
||||
for (unsigned i = 0, end = list.size(); i < end; ++i)
|
||||
{
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Number"] = stringify(i + 1);
|
||||
entry["Creator"] = list[i]->who;
|
||||
entry["Created"] = Anope::strftime(list[i]->time);
|
||||
entry["Created"] = Anope::strftime(list[i]->time, source.GetAccount());
|
||||
entry["Text"] = list[i]->text;
|
||||
lflist.AddEntry(entry);
|
||||
}
|
||||
@@ -235,7 +235,7 @@ class NewsBase : public Command
|
||||
{
|
||||
this->SetSyntax(_("ADD \037text\037"));
|
||||
this->SetSyntax(_("DEL {\037num\037 | ALL}"));
|
||||
this->SetSyntax(_("LIST"));
|
||||
this->SetSyntax("LIST");
|
||||
}
|
||||
|
||||
virtual ~NewsBase()
|
||||
|
||||
@@ -70,7 +70,7 @@ class CommandOSOper : public Command
|
||||
this->SetSyntax(_("ADD \037oper\037 \037type\037"));
|
||||
this->SetSyntax(_("DEL \037oper\037"));
|
||||
this->SetSyntax(_("INFO \037type\037"));
|
||||
this->SetSyntax(_("LIST"));
|
||||
this->SetSyntax("LIST");
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
|
||||
@@ -182,7 +182,7 @@ class CommandOSSession : public Command
|
||||
else
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Session").AddColumn("Host");
|
||||
list.AddColumn(_("Session")).AddColumn(_("Host"));
|
||||
|
||||
for (SessionService::SessionMap::iterator it = session_service->GetSessions().begin(), it_end = session_service->GetSessions().end(); it != it_end; ++it)
|
||||
{
|
||||
@@ -228,9 +228,9 @@ class CommandOSSession : public Command
|
||||
}
|
||||
|
||||
if (!session)
|
||||
source.Reply(_("\002%s\002 not found on session list, but has a limit of \002%d\002 because it matches entry: \2%s\2."), param.c_str(), limit, entry.c_str());
|
||||
source.Reply(_("\002%s\002 not found on session list, but has a limit of \002%d\002 because it matches entry: \002%s\002."), param.c_str(), limit, entry.c_str());
|
||||
else
|
||||
source.Reply(_("The host \002%s\002 currently has \002%d\002 sessions with a limit of \002%d\002 because it matches entry: \2%s\2."), session->addr.mask().c_str(), session->count, limit, entry.c_str());
|
||||
source.Reply(_("The host \002%s\002 currently has \002%d\002 sessions with a limit of \002%d\002 because it matches entry: \002%s\002."), session->addr.mask().c_str(), session->count, limit, entry.c_str());
|
||||
}
|
||||
public:
|
||||
CommandOSSession(Module *creator) : Command(creator, "operserv/session", 2, 2)
|
||||
@@ -466,9 +466,10 @@ class CommandOSException : public Command
|
||||
{
|
||||
class ExceptionListCallback : public NumberList
|
||||
{
|
||||
CommandSource &source;
|
||||
ListFormatter &list;
|
||||
public:
|
||||
ExceptionListCallback(ListFormatter &_list, const Anope::string &numlist) : NumberList(numlist, false), list(_list)
|
||||
ExceptionListCallback(CommandSource &_source, ListFormatter &_list, const Anope::string &numlist) : NumberList(numlist, false), source(_source), list(_list)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -483,13 +484,13 @@ class CommandOSException : public Command
|
||||
entry["Number"] = stringify(Number);
|
||||
entry["Mask"] = e->mask;
|
||||
entry["By"] = e->who;
|
||||
entry["Created"] = Anope::strftime(e->time);
|
||||
entry["Created"] = Anope::strftime(e->time, source.GetAccount());
|
||||
entry["Limit"] = stringify(e->limit);
|
||||
entry["Reason"] = e->reason;
|
||||
this->list.AddEntry(entry);
|
||||
}
|
||||
}
|
||||
nl_list(list, mask);
|
||||
nl_list(source, list, mask);
|
||||
nl_list.Process();
|
||||
}
|
||||
else
|
||||
@@ -503,7 +504,7 @@ class CommandOSException : public Command
|
||||
entry["Number"] = stringify(i + 1);
|
||||
entry["Mask"] = e->mask;
|
||||
entry["By"] = e->who;
|
||||
entry["Created"] = Anope::strftime(e->time);
|
||||
entry["Created"] = Anope::strftime(e->time, source.GetAccount());
|
||||
entry["Limit"] = stringify(e->limit);
|
||||
entry["Reason"] = e->reason;
|
||||
list.AddEntry(entry);
|
||||
@@ -528,7 +529,7 @@ class CommandOSException : public Command
|
||||
void DoList(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Limit").AddColumn("Mask");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Limit")).AddColumn(_("Mask"));
|
||||
|
||||
this->ProcessList(source, params, list);
|
||||
}
|
||||
@@ -536,7 +537,7 @@ class CommandOSException : public Command
|
||||
void DoView(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Mask").AddColumn("By").AddColumn("Created").AddColumn("Limit").AddColumn("Reason");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("By")).AddColumn(_("Created")).AddColumn(_("Limit")).AddColumn(_("Reason"));
|
||||
|
||||
this->ProcessList(source, params, list);
|
||||
}
|
||||
@@ -546,7 +547,7 @@ class CommandOSException : public Command
|
||||
{
|
||||
this->SetDesc(_("Modify the session-limit exception list"));
|
||||
this->SetSyntax(_("ADD [\037+expiry\037] \037mask\037 \037limit\037 \037reason\037"));
|
||||
this->SetSyntax(_("DEL {\037mask\037 | \037list\037}"));
|
||||
this->SetSyntax(_("DEL {\037mask\037 | \037entry-num\037 | \037list\037}"));
|
||||
this->SetSyntax(_("MOVE \037num\037 \037position\037"));
|
||||
this->SetSyntax(_("LIST [\037mask\037 | \037list\037]"));
|
||||
this->SetSyntax(_("VIEW [\037mask\037 | \037list\037]"));
|
||||
|
||||
@@ -129,8 +129,8 @@ class CommandOSStats : public Command
|
||||
{
|
||||
time_t uptime = Anope::CurTime - Anope::StartTime;
|
||||
source.Reply(_("Current users: \002%d\002 (\002%d\002 ops)"), UserListByNick.size(), OperCount);
|
||||
source.Reply(_("Maximum users: \002%d\002 (%s)"), MaxUserCount, Anope::strftime(MaxUserTime).c_str());
|
||||
source.Reply(_("Services up %s."), Anope::Duration(uptime).c_str());
|
||||
source.Reply(_("Maximum users: \002%d\002 (%s)"), MaxUserCount, Anope::strftime(MaxUserTime, source.GetAccount()).c_str());
|
||||
source.Reply(_("Services up %s."), Anope::Duration(uptime, source.GetAccount()).c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ class CommandOSSXLineBase : public Command
|
||||
void OnList(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Mask").AddColumn("Reason");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("Reason"));
|
||||
|
||||
this->ProcessList(source, params, list);
|
||||
}
|
||||
@@ -192,7 +192,7 @@ class CommandOSSXLineBase : public Command
|
||||
void OnView(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn("Number").AddColumn("Mask").AddColumn("By").AddColumn("Created").AddColumn("Expires").AddColumn("Reason");
|
||||
list.AddColumn(_("Number")).AddColumn(_("Mask")).AddColumn(_("By")).AddColumn(_("Created")).AddColumn(_("Expires")).AddColumn(_("Reason"));
|
||||
this->ProcessList(source, params, list);
|
||||
}
|
||||
|
||||
@@ -213,7 +213,11 @@ class CommandOSSXLineBase : public Command
|
||||
public:
|
||||
CommandOSSXLineBase(Module *creator, const Anope::string &cmd) : Command(creator, cmd, 1, 4)
|
||||
{
|
||||
this->SetDesc(Anope::printf(_("Manipulate the %s list"), cmd.c_str()));
|
||||
}
|
||||
|
||||
const Anope::string GetDesc(CommandSource &source) const anope_override
|
||||
{
|
||||
return Anope::printf(Language::Translate(source.GetAccount(), _("Manipulate the %s list")), source.command.upper().c_str());
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
@@ -408,7 +412,7 @@ class CommandOSSNLine : public CommandOSSXLineBase
|
||||
this->SetSyntax(_("DEL {\037mask\037 | \037entry-num\037 | \037list\037 | \037id\037}"));
|
||||
this->SetSyntax(_("LIST [\037mask\037 | \037list\037 | \037id\037]"));
|
||||
this->SetSyntax(_("VIEW [\037mask\037 | \037list\037 | \037id\037]"));
|
||||
this->SetSyntax(_("CLEAR"));
|
||||
this->SetSyntax("CLEAR");
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
@@ -641,7 +645,7 @@ class CommandOSSQLine : public CommandOSSXLineBase
|
||||
this->SetSyntax(_("DEL {\037mask\037 | \037entry-num\037 | \037list\037 | \037id\037}"));
|
||||
this->SetSyntax(_("LIST [\037mask\037 | \037list\037 | \037id\037]"));
|
||||
this->SetSyntax(_("VIEW [\037mask\037 | \037list\037 | \037id\037]"));
|
||||
this->SetSyntax(_("CLEAR"));
|
||||
this->SetSyntax("CLEAR");
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
|
||||
@@ -522,12 +522,12 @@ class NickServCore : public Module, public NickServService
|
||||
{
|
||||
time_t nickserv_expire = Config->GetModule(this)->Get<time_t>("expire");
|
||||
if (!na->HasExt("NS_NO_EXPIRE") && nickserv_expire && !Anope::NoExpire && na->last_seen != Anope::CurTime)
|
||||
info[_("Expires")] = Anope::strftime(na->last_seen + nickserv_expire);
|
||||
info[_("Expires")] = Anope::strftime(na->last_seen + nickserv_expire, source.GetAccount());
|
||||
}
|
||||
else
|
||||
{
|
||||
time_t unconfirmed_expire = Config->GetModule(this)->Get<time_t>("unconfirmedexpire", "1d");
|
||||
info[_("Expires")] = Anope::strftime(na->time_registered + unconfirmed_expire);
|
||||
info[_("Expires")] = Anope::strftime(na->time_registered + unconfirmed_expire, source.GetAccount());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user