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:
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user