From 148b26f687ce85dc01e852a2358b03d493757ada Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 23 Jun 2014 07:12:41 -0400 Subject: Mostly working language string rewrite with new format strings --- include/users.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/users.h') diff --git a/include/users.h b/include/users.h index e89d7c8af..972fa2ac0 100644 --- a/include/users.h +++ b/include/users.h @@ -185,10 +185,15 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe /** * Send a message (notice or privmsg, depending on settings) to a user * @param source Sender - * @param fmt Format of the Message - * @param ... any number of parameters - */ - void SendMessage(const MessageSource &, const char *fmt, ...); + * @param message Format of the Message + * @param args any number of parameters + */ + template + void SendMessage(const MessageSource &source, const char *message, Args&&... args) + { + const char *translated_message = Language::Translate(this->Account(), message); + SendMessage(source, Anope::Format(translated_message, std::forward(args)...)); + } void SendMessage(const MessageSource &, const Anope::string &msg) override; /** Identify the user to a nick. -- cgit