summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-06-17 19:57:43 -0400
committerAdam <Adam@anope.org>2011-06-17 19:57:43 -0400
commita1b36ec0a527e6d7a9d224b56bf9571619d5f92e (patch)
tree5e74290f46205ef1ad86700e1f04ec016b1f66fd /src/commands.cpp
parent48e995ddf2cd30a05222a51e665c02b1e7ae567a (diff)
Search all domains for language strings, fixes the mess that we used to use to translate strings in 3rd party modules
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 194547a58..fea6e4376 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -53,21 +53,17 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope:
if (!bi || !u)
return;
- PushLanguage("anope", u->Account() ? u->Account()->language : "");
-
if (!c)
{
u->SendMessage(bi, _("Unknown command \002%s\002. \"%s%s HELP\" for help."), command.c_str(), Config->UseStrictPrivMsgString.c_str(), bi->nick.c_str());
- PopLanguage();
return;
}
// Command requires registered users only
if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !u->IsIdentified())
{
- u->SendMessage(bi, _(NICK_IDENTIFY_REQUIRED), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str());
+ u->SendMessage(bi, NICK_IDENTIFY_REQUIRED, Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str());
Log(LOG_COMMAND, "denied", bi) << "Access denied for unregistered user " << u->GetMask() << " with command " << command;
- PopLanguage();
return;
}
@@ -107,7 +103,6 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope:
{
c->OnSyntaxError(source, !params.empty() ? params[params.size() - 1] : "");
source.DoReply();
- PopLanguage();
return;
}
@@ -116,17 +111,15 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope:
if (MOD_RESULT == EVENT_STOP)
{
source.DoReply();
- PopLanguage();
return;
}
// If the command requires a permission, and they aren't registered or don't have the required perm, DENIED
if (!c->permission.empty() && !u->HasCommand(c->permission))
{
- u->SendMessage(bi, _(ACCESS_DENIED));
+ u->SendMessage(bi, ACCESS_DENIED);
Log(LOG_COMMAND, "denied", bi) << "Access denied for user " << u->GetMask() << " with command " << command;
source.DoReply();
- PopLanguage();
return;
}
@@ -137,8 +130,6 @@ void mod_run_cmd(BotInfo *bi, User *u, ChannelInfo *ci, Command *c, const Anope:
FOREACH_MOD(I_OnPostCommand, OnPostCommand(source, c, params));
source.DoReply();
}
-
- PopLanguage();
}
/**