diff options
author | Adam <Adam@anope.org> | 2011-02-04 15:30:31 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-02-04 15:30:31 -0500 |
commit | 08583dc107974252312fb7c87532c9deb68e7f63 (patch) | |
tree | 0c42ec7422752cabd8352b49be976b4dc100c56c /modules/core/cs_invite.cpp | |
parent | c362a1e077d5ede9eadbe79483f2a755b5883e9a (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_invite.cpp')
-rw-r--r-- | modules/core/cs_invite.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/modules/core/cs_invite.cpp b/modules/core/cs_invite.cpp index a7a3a6e40..0f55c1e1e 100644 --- a/modules/core/cs_invite.cpp +++ b/modules/core/cs_invite.cpp @@ -30,7 +30,7 @@ class CommandCSInvite : public Command if (!(c = findchan(chan))) { - source.Reply(CHAN_X_NOT_IN_USE, chan.c_str()); + source.Reply(LanguageString::CHAN_X_NOT_IN_USE, chan.c_str()); return MOD_CONT; } @@ -38,7 +38,7 @@ class CommandCSInvite : public Command if (!check_access(u, ci, CA_INVITE)) { - source.Reply(ACCESS_DENIED); + source.Reply(LanguageString::ACCESS_DENIED); return MOD_CONT; } @@ -49,7 +49,7 @@ class CommandCSInvite : public Command { if (!(u2 = finduser(params[1]))) { - source.Reply(NICK_X_NOT_IN_USE, params[1].c_str()); + source.Reply(LanguageString::NICK_X_NOT_IN_USE, params[1].c_str()); return MOD_CONT; } } @@ -58,30 +58,35 @@ class CommandCSInvite : public Command Log(LOG_COMMAND, u, this, ci) << "for " << u2->nick; if (c->FindUser(u2)) - source.Reply(CHAN_INVITE_ALREADY_IN, c->name.c_str()); + source.Reply(_("You are already in \002%s\002! "), c->name.c_str()); else { ircdproto->SendInvite(whosends(ci), chan, u2->nick); - source.Reply(CHAN_INVITE_OTHER_SUCCESS, u2->nick.c_str(), c->name.c_str()); - u2->SendMessage(whosends(ci), CHAN_INVITE_SUCCESS, c->name.c_str()); + source.Reply(_("\002%s\002 has been invited to \002%s\002."), u2->nick.c_str(), c->name.c_str()); + u2->SendMessage(whosends(ci), _("You have been invited to \002%s\002."), c->name.c_str()); } return MOD_CONT; } bool OnHelp(CommandSource &source, const Anope::string &subcommand) { - source.Reply(CHAN_HELP_INVITE); + source.Reply(_("Syntax: \002INVITE \037channel\037\002\n" + " \n" + "Tells %S to invite you into the given channel.\n" + " \n" + "By default, limited to AOPs or those with level 5 and above\n" + "on the channel.")); return true; } void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { - SyntaxError(source, "INVITE", CHAN_INVITE_SYNTAX); + SyntaxError(source, "INVITE", _("INVITE \037channel\037")); } void OnServHelp(CommandSource &source) { - source.Reply(CHAN_HELP_CMD_INVITE); + source.Reply(_(" INVITE Tells ChanServ to invite you into a channel")); } }; |