From 16ca76c2e7ab287e480185fbb03a0bb438351eda Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 23 Jan 2017 12:35:14 -0500 Subject: Make log system use newer format strings Also allow log messages to be translatable --- modules/hostserv/request.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'modules/hostserv/request.cpp') diff --git a/modules/hostserv/request.cpp b/modules/hostserv/request.cpp index 9508a9abc..bef1f1548 100644 --- a/modules/hostserv/request.cpp +++ b/modules/hostserv/request.cpp @@ -232,7 +232,7 @@ class CommandHSRequest : public Command source.Reply(_("Your vhost has been requested.")); this->SendMemos(source, user, host); - Log(LOG_COMMAND, source, this) << "to request new vhost " << (!user.empty() ? user + "@" : "") << host; + logger.Command(LogType::COMMAND, source, _("{source} used {command} to request new vhost {0}"), (!user.empty() ? user + "@" : "") + host); } bool OnHelp(CommandSource &source, const Anope::string &subcommand) override @@ -303,7 +303,8 @@ class CommandHSActivate : public Command memoserv->Send(source.service->nick, na->GetNick(), _("[auto memo] Your requested vHost has been approved."), true); source.Reply(_("Vhost for \002{0}\002 has been activated."), na->GetNick()); - Log(LOG_COMMAND, source, this) << "for " << na->GetNick() << " for vhost " << (!req->GetIdent().empty() ? req->GetIdent() + "@" : "") << req->GetHost(); + logger.Command(LogType::COMMAND, source, _("{source} used {command} for {0} for vhost {1}"), + na->GetNick(), (!req->GetIdent().empty() ? req->GetIdent() + "@" : "") + req->GetHost()); req->Delete(); } @@ -367,7 +368,8 @@ class CommandHSReject : public Command } source.Reply(_("Vhost for \002{0}\002 has been rejected."), na->GetNick()); - Log(LOG_COMMAND, source, this) << "to reject vhost for " << nick << " (" << (!reason.empty() ? reason : "no reason") << ")"; + logger.Command(LogType::COMMAND, source, _("{source} used {command} to reject vhost for {0} ({1})"), + na->GetNick(), !reason.empty() ? reason : "no reason"); } bool OnHelp(CommandSource &source, const Anope::string &subcommand) override -- cgit