1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 21:06:37 +02:00

Search all domains for language strings, fixes the mess that we used to use to translate strings in 3rd party modules

This commit is contained in:
Adam
2011-06-17 19:57:43 -04:00
parent 48e995ddf2
commit a1b36ec0a5
63 changed files with 767 additions and 633 deletions
-22
View File
@@ -108,28 +108,6 @@ int Module::DelCommand(BotInfo *bi, Command *c)
return MOD_ERR_OK;
}
void Module::SendMessage(CommandSource &source, const char *fmt, ...)
{
Anope::string language = (source.u && source.u->Account() ? source.u->Account()->language : "");
PushLanguage(this->name, language);
fmt = anope_gettext(fmt);
va_list args;
char buf[4096];
va_start(args, fmt);
vsnprintf(buf, sizeof(buf) - 1, fmt, args);
va_end(args);
sepstream sep(buf, '\n');
Anope::string token;
while (sep.GetToken(token))
source.Reply(token);
PopLanguage();
}
Service::Service(Module *o, const Anope::string &n) : owner(o), name(n)
{
}