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/chanserv/unban.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/chanserv/unban.cpp') diff --git a/modules/chanserv/unban.cpp b/modules/chanserv/unban.cpp index 035819ff2..ac7c08fdf 100644 --- a/modules/chanserv/unban.cpp +++ b/modules/chanserv/unban.cpp @@ -42,20 +42,20 @@ class CommandCSUnban : public Command if (!source.GetUser()) return; - unsigned count = 0; + unsigned int count = 0; for (ChanServ::Channel *ci : source.GetAccount()->GetRefs()) { if (!ci->c || !source.AccessFor(ci).HasPriv("UNBAN")) continue; - for (unsigned j = 0; j < modes.size(); ++j) + for (unsigned int j = 0; j < modes.size(); ++j) if (ci->c->Unban(source.GetUser(), modes[j]->name, true)) ++count; } - Log(LOG_COMMAND, source, this, NULL) << "on all channels"; - source.Reply(_("You have been unbanned from %d channels."), count); + logger.Command(LogType::COMMAND, source, _("{source} used {command} on all channels")); + source.Reply(_("You have been unbanned from \002{0}\002 channels."), count); return; } @@ -92,7 +92,7 @@ class CommandCSUnban : public Command } bool override = !source.AccessFor(ci).HasPriv("UNBAN") && source.HasPriv("chanserv/kick"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to unban " << u2->nick; + logger.Command(override ? LogType::OVERRIDE : LogType::COMMAND, source, _("{source} used {command} on {channel} to unban {0}"), u2->nick); for (unsigned i = 0; i < modes.size(); ++i) ci->c->Unban(u2, modes[i]->name, source.GetUser() == u2); -- cgit