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/cert.cpp | |
parent | ff030c1eb7c3764f9add2a689479e84d616cabcb (diff) |
Make log system use newer format strings
Also allow log messages to be translatable
Diffstat (limited to 'modules/nickserv/cert.cpp')
-rw-r--r-- | modules/nickserv/cert.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/nickserv/cert.cpp b/modules/nickserv/cert.cpp index 51eae0fb0..d2e91bce6 100644 --- a/modules/nickserv/cert.cpp +++ b/modules/nickserv/cert.cpp @@ -187,8 +187,8 @@ class CommandNSCert : public Command e->SetCert(certfp); #warning "events?" + logger.Command(nc == source.GetAccount() ? LogType::COMMAND : LogType::ADMIN, source, _("{source} used {command} to add certificate fingerprint {0} to {1}"), certfp, nc->GetDisplay()); - Log(nc == source.GetAccount() ? LOG_COMMAND : LOG_ADMIN, source, this) << "to ADD certificate fingerprint " << certfp << " to " << nc->GetDisplay(); source.Reply(_("\002{0}\002 added to the certificate list of \002{1}\002."), certfp, nc->GetDisplay()); } @@ -218,7 +218,7 @@ class CommandNSCert : public Command cert->Delete(); - Log(nc == source.GetAccount() ? LOG_COMMAND : LOG_ADMIN, source, this) << "to DELETE certificate fingerprint " << certfp << " from " << nc->GetDisplay(); + logger.Command(nc == source.GetAccount() ? LogType::COMMAND : LogType::ADMIN, source, _("{source} used {command} to delete certificate fingerprint {0} from {1}"), certfp, nc->GetDisplay()); source.Reply(_("\002{0}\002 deleted from the access list of \002{1}\002."), certfp, nc->GetDisplay()); } @@ -354,8 +354,9 @@ class NSCert : public Module else u->Login(nc); - u->SendMessage(NickServ, _("SSL certificate fingerprint accepted, you are now identified to \002%s\002."), nc->GetDisplay().c_str()); - Log(NickServ) << u->GetMask() << " automatically identified for account " << nc->GetDisplay() << " via SSL certificate fingerprint"; + u->SendMessage(NickServ, _("SSL certificate fingerprint accepted, you are now identified to \002{0}\002."), nc->GetDisplay()); + NickServ->logger.Log(_("{0} automatically identified for account {1} via SSL certificate fingerprint"), + u->GetMask(), nc->GetDisplay()); } EventReturn OnNickValidate(User *u, NickServ::Nick *na) override @@ -376,7 +377,8 @@ class NSCert : public Module u->Identify(na); u->SendMessage(NickServ, _("SSL certificate fingerprint accepted, you are now identified.")); - Log(NickServ) << u->GetMask() << " automatically identified for account " << na->GetAccount()->GetDisplay() << " via SSL certificate fingerprint"; + NickServ->logger.Log(_("{0} automatically identified for account {1} via SSL certificate fingerprint"), + u->GetMask(), na->GetAccount()->GetDisplay()); return EVENT_ALLOW; } |