summaryrefslogtreecommitdiff
path: root/modules/core/cs_clone.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-02-04 15:30:31 -0500
committerAdam <Adam@anope.org>2011-02-04 15:30:31 -0500
commit08583dc107974252312fb7c87532c9deb68e7f63 (patch)
tree0c42ec7422752cabd8352b49be976b4dc100c56c /modules/core/cs_clone.cpp
parentc362a1e077d5ede9eadbe79483f2a755b5883e9a (diff)
Moved the language strings which are only used once
out of the core and into the modules that use them.
Diffstat (limited to 'modules/core/cs_clone.cpp')
-rw-r--r--modules/core/cs_clone.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/modules/core/cs_clone.cpp b/modules/core/cs_clone.cpp
index 7f4d3ca89..9222819fe 100644
--- a/modules/core/cs_clone.cpp
+++ b/modules/core/cs_clone.cpp
@@ -31,24 +31,24 @@ public:
if (!check_access(u, ci, CA_SET))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
ChannelInfo *target_ci = cs_findchan(target);
if (!target_ci)
{
- source.Reply(CHAN_X_NOT_REGISTERED, target.c_str());
+ source.Reply(LanguageString::CHAN_X_NOT_REGISTERED, target.c_str());
return MOD_CONT;
}
if (!IsFounder(u, ci) || !IsFounder(u, target_ci))
{
- source.Reply(ACCESS_DENIED);
+ source.Reply(LanguageString::ACCESS_DENIED);
return MOD_CONT;
}
if (Config->CSMaxReg && u->Account()->channelcount >= Config->CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit"))
{
- source.Reply(u->Account()->channelcount > Config->CSMaxReg ? CHAN_EXCEEDED_CHANNEL_LIMIT : CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
+ source.Reply(u->Account()->channelcount > Config->CSMaxReg ? LanguageString::CHAN_EXCEEDED_CHANNEL_LIMIT : LanguageString::CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
return MOD_CONT;
}
@@ -100,7 +100,7 @@ public:
FOREACH_MOD(I_OnChanRegistered, OnChanRegistered(target_ci));
- source.Reply(CHAN_CLONED, channel.c_str(), target.c_str());
+ source.Reply(_("All settings from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
}
else if (what.equals_ci("ACCESS"))
{
@@ -111,7 +111,7 @@ public:
target_ci->AddAccess(access->mask, access->level, access->creator, access->last_seen);
}
- source.Reply(CHAN_CLONED_ACCESS, channel.c_str(), target.c_str());
+ source.Reply(_("All access entries from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
}
else if (what.equals_ci("AKICK"))
{
@@ -125,7 +125,7 @@ public:
target_ci->AddAkick(akick->creator, akick->mask, akick->reason, akick->addtime, akick->last_used);
}
- source.Reply(CHAN_CLONED_AKICK, channel.c_str(), target.c_str());
+ source.Reply(_("All akick entries from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
}
else if (what.equals_ci("BADWORDS"))
{
@@ -136,7 +136,7 @@ public:
target_ci->AddBadWord(bw->word, bw->type);
}
- source.Reply(CHAN_CLONED_BADWORDS, channel.c_str(), target.c_str());
+ source.Reply(_("All badword entries from \002%s\002 have been transferred to \002%s\002"), channel.c_str(), target.c_str());
}
else
{
@@ -151,18 +151,23 @@ public:
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
- source.Reply(CHAN_HELP_CLONE);
+ source.Reply(_("Syntax: \002CLONE \037channel\037 \037target\037 [all | access | akick | badwords]\002\n"
+ " \n"
+ "Copies all settings, access, akicks, etc from channel to the\n"
+ "target channel. If access, akick, or badwords is specified then only\n"
+ "the respective settings are transferred. You must have founder level\n"
+ "access to \037channel\037 and \037target\037."));
return true;
}
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
{
- SyntaxError(source, "CLONE", CHAN_CLONE_SYNTAX);
+ SyntaxError(source, "CLONE", _("CLONE \037channel\037 \037target\037"));
}
void OnServHelp(CommandSource &source)
{
- source.Reply(CHAN_HELP_CMD_CLONE);
+ source.Reply(_(" CLONE Copy all settings from one channel to another"));
}
};