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

Fixed translating messages with varargs sent directly to users, too

This commit is contained in:
Adam
2011-12-11 17:01:56 -05:00
parent fa54d5acb7
commit 3c5337fb8a
+6 -7
View File
@@ -220,15 +220,14 @@ void User::SendMessage(BotInfo *source, const char *fmt, ...)
va_list args;
char buf[BUFSIZE] = "";
if (fmt)
{
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, fmt, args);
const char *translated_message = translate(this, fmt);
this->SendMessage(source, Anope::string(buf));
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, translated_message, args);
va_end(args);
}
this->SendMessage(source, Anope::string(buf));
va_end(args);
}
void User::SendMessage(BotInfo *source, Anope::string msg)