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/nickserv/suspend.cpp | |
parent | ff030c1eb7c3764f9add2a689479e84d616cabcb (diff) |
Make log system use newer format strings
Also allow log messages to be translatable
Diffstat (limited to 'modules/nickserv/suspend.cpp')
-rw-r--r-- | modules/nickserv/suspend.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/nickserv/suspend.cpp b/modules/nickserv/suspend.cpp index 90362bcf2..c630dcd92 100644 --- a/modules/nickserv/suspend.cpp +++ b/modules/nickserv/suspend.cpp @@ -194,7 +194,8 @@ class CommandNSSuspend : public Command } } - Log(LOG_ADMIN, source, this) << "for " << nick << " (" << (!reason.empty() ? reason : "No reason") << "), expires on " << (expiry_secs ? Anope::strftime(Anope::CurTime + expiry_secs) : "never"); + logger.Command(LogType::ADMIN, source, _("{source} used {command} for {0} ({1}), expires on {2}"), + nick, !reason.empty() ? reason : "No reason", expiry_secs ? Anope::strftime(Anope::CurTime + expiry_secs) : "never"); source.Reply(_("\002{0}\002 is now suspended."), na->GetNick()); EventManager::Get()->Dispatch(&Event::NickSuspend::OnNickSuspend, na); @@ -202,8 +203,9 @@ class CommandNSSuspend : public Command bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { +#warning "show expiry" source.Reply(_("Suspends \037account\037, which prevents it from being used while keeping all the data for it." - " If an expiry is given the account will be unsuspended after that period of time, otherwise the default expiry from the configuration is used.")); // XXX + " If an expiry is given the account will be unsuspended after that period of time, otherwise the default expiry from the configuration is used.")); return true; } }; @@ -238,7 +240,8 @@ class CommandNSUnSuspend : public Command return; } - Log(LOG_ADMIN, source, this) << "for " << na->GetNick() << " which was suspended by " << (!si->GetBy().empty() ? si->GetBy() : "(none)") << " for: " << (!si->GetReason().empty() ? si->GetReason() : "No reason"); + logger.Command(LogType::ADMIN, source, _("{source} used {command} for {0}, which was suspended by {1} for: {2}"), + !si->GetBy().empty() ? si->GetBy() : "(noone)", !si->GetReason().empty() ? si->GetReason() : "no reason"); si->Delete(); @@ -329,7 +332,7 @@ class NSSuspend : public Module na->SetLastSeen(Anope::CurTime); s->Delete(); - Log(LOG_NORMAL, "nickserv/expire", Config->GetClient("NickServ")) << "Expiring suspend for " << na->GetNick(); + logger.Category("nickserv/expire").Bot("NickServ").Log(_("Expiring suspend for {0}"), na->GetNick()); } } |