summaryrefslogtreecommitdiff
path: root/modules/commands/cs_getkey.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-06-23 07:12:41 -0400
committerAdam <Adam@anope.org>2014-06-23 07:12:41 -0400
commit148b26f687ce85dc01e852a2358b03d493757ada (patch)
treef81ea553d0384ec6063eff45cfaff5aa92aaa1c9 /modules/commands/cs_getkey.cpp
parent0dba0692f9f88275b7d89d511bf22124217bc4c6 (diff)
Mostly working language string rewrite with new format strings
Diffstat (limited to 'modules/commands/cs_getkey.cpp')
-rw-r--r--modules/commands/cs_getkey.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/modules/commands/cs_getkey.cpp b/modules/commands/cs_getkey.cpp
index 122035acc..75a36d184 100644
--- a/modules/commands/cs_getkey.cpp
+++ b/modules/commands/cs_getkey.cpp
@@ -24,37 +24,38 @@ class CommandCSGetKey : public Command
{
const Anope::string &chan = params[0];
- ChanServ::Channel *ci = ChanServ::Find(params[0]);
+ ChanServ::Channel *ci = ChanServ::Find(chan);
if (ci == NULL)
{
- source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
+ source.Reply(_("Channel \002{0}\002 isn't registered."), chan);
return;
}
if (!source.AccessFor(ci).HasPriv("GETKEY") && !source.HasCommand("chanserv/getkey"))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(_("Access denied. You do not have privilege \002{0}\002 on \002{1}\002."), "GETKEY", ci->name);
return;
}
Anope::string key;
if (!ci->c || !ci->c->GetParam("KEY", key))
{
- source.Reply(_("Channel \002%s\002 has no key."), chan.c_str());
+ source.Reply(_("Channel \002{0}\002 does not have a key."), ci->name);
return;
}
bool override = !source.AccessFor(ci).HasPriv("GETKEY");
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci);
- source.Reply(_("Key for channel \002%s\002 is \002%s\002."), chan.c_str(), key.c_str());
+ source.Reply(_("Key for channel \002{0}\002 is \002{1}\002."), ci->name, key);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
{
- this->SendSyntax(source);
- source.Reply(" ");
- source.Reply(_("Returns the key of the given channel."));
+ source.Reply(_("Returns the key of \037channel\037.\n"
+ "\n"
+ "Use of this command requires the \002{0}\002 privilege on \037channel\037."),
+ "GETKEY");
return true;
}
};