summaryrefslogtreecommitdiff
path: root/modules/core/cs_main.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 /modules/core/cs_main.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 'modules/core/cs_main.cpp')
-rw-r--r--modules/core/cs_main.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/modules/core/cs_main.cpp b/modules/core/cs_main.cpp
index 9d1664afb..49d1c800b 100644
--- a/modules/core/cs_main.cpp
+++ b/modules/core/cs_main.cpp
@@ -23,12 +23,9 @@ class ChanServBotInfo : public BotInfo
void OnMessage(User *u, const Anope::string &message)
{
- PushLanguage("anope", u->Account() ? u->Account()->language : "");
-
if (!u->HasMode(UMODE_OPER) && Config->CSOpersOnly)
{
- u->SendMessage(ChanServ, _(ACCESS_DENIED));
- PopLanguage();
+ u->SendMessage(ChanServ, ACCESS_DENIED);
return;
}
@@ -46,30 +43,26 @@ class ChanServBotInfo : public BotInfo
{
if (ci->HasFlag(CI_SUSPENDED) && !c->HasFlag(CFLAG_ALLOW_SUSPENDED))
{
- u->SendMessage(this, _(_(CHAN_X_SUSPENDED)), ci->name.c_str());
+ u->SendMessage(this, CHAN_X_SUSPENDED, ci->name.c_str());
Log(LOG_COMMAND, "denied", this) << "Access denied for user " << u->GetMask() << " with command " << command << " because of SUSPENDED channel " << ci->name;
- PopLanguage();
return;
}
}
else if (!c->HasFlag(CFLAG_ALLOW_UNREGISTEREDCHANNEL))
{
- u->SendMessage(this, _(CHAN_X_NOT_REGISTERED), param.c_str());
- PopLanguage();
+ u->SendMessage(this, CHAN_X_NOT_REGISTERED, param.c_str());
return;
}
}
/* A user not giving a channel name for a param that should be a channel */
else
{
- u->SendMessage(this, _(CHAN_X_INVALID), param.c_str());
- PopLanguage();
+ u->SendMessage(this, CHAN_X_INVALID, param.c_str());
return;
}
}
}
- PopLanguage();
BotInfo::OnMessage(u, message);
}
};