diff options
| author | Adam <Adam@anope.org> | 2017-01-23 12:35:14 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2017-01-23 12:35:14 -0500 |
| commit | 16ca76c2e7ab287e480185fbb03a0bb438351eda (patch) | |
| tree | dfb25534afa2352b65b2ee707086cb5eecc96fbb /modules/chanserv/unban.cpp | |
| parent | ff030c1eb7c3764f9add2a689479e84d616cabcb (diff) | |
Make log system use newer format strings
Also allow log messages to be translatable
Diffstat (limited to 'modules/chanserv/unban.cpp')
| -rw-r--r-- | modules/chanserv/unban.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<ChanServ::Channel *>()) { 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); |
