1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 11:36:38 +02:00

Moved the language strings which are only used once

out of the core and into the modules that use them.
This commit is contained in:
Adam
2011-02-04 15:30:31 -05:00
parent c362a1e077
commit 08583dc107
226 changed files with 42289 additions and 45412 deletions
+6 -3
View File
@@ -289,19 +289,22 @@ void Module::SendMessage(CommandSource &source, const char *fmt, ...)
{
Anope::string language = (source.u && source.u->Account() ? source.u->Account()->language : "");
Anope::string message = GetString(this->name.c_str(), language, fmt);
PushLanguage(this->name, language);
fmt = anope_gettext(fmt);
va_list args;
char buf[4096];
va_start(args, fmt);
vsnprintf(buf, sizeof(buf) - 1, message.c_str(), args);
vsnprintf(buf, sizeof(buf) - 1, fmt, args);
va_end(args);
sepstream sep(buf, '\n');
Anope::string token;
while (sep.GetToken(token))
source.Reply(token.c_str());
source.Reply(token);
PopLanguage();
}
Service::Service(Module *o, const Anope::string &n) : owner(o), name(n)