diff options
Diffstat (limited to 'modules/hostserv')
| -rw-r--r-- | modules/hostserv/add.cpp | 2 | ||||
| -rw-r--r-- | modules/hostserv/del.cpp | 5 | ||||
| -rw-r--r-- | modules/hostserv/off.cpp | 2 | ||||
| -rw-r--r-- | modules/hostserv/on.cpp | 2 | ||||
| -rw-r--r-- | modules/hostserv/request.cpp | 8 | ||||
| -rw-r--r-- | modules/hostserv/set.cpp | 2 |
6 files changed, 13 insertions, 8 deletions
diff --git a/modules/hostserv/add.cpp b/modules/hostserv/add.cpp index f9388c975..3448dbc41 100644 --- a/modules/hostserv/add.cpp +++ b/modules/hostserv/add.cpp @@ -101,7 +101,7 @@ class CommandHSAdd : public Command } Anope::string mask = (!user.empty() ? user + "@" : "") + host; - Log(LOG_ADMIN, source, this) << "to add the vhost " << mask << " to " << na->GetAccount()->GetDisplay(); + logger.Command(LogType::ADMIN, source, _("{source} used {command} to add the vhost {0} to {1}"), mask, na->GetAccount()->GetDisplay()); HostServ::VHost *vhost = Serialize::New<HostServ::VHost *>(); if (vhost == nullptr) diff --git a/modules/hostserv/del.cpp b/modules/hostserv/del.cpp index 4d754ac1b..a72c61c9a 100644 --- a/modules/hostserv/del.cpp +++ b/modules/hostserv/del.cpp @@ -54,7 +54,7 @@ class CommandHSDel : public Command return; } - Log(LOG_ADMIN, source, this) << "on " << na->GetAccount()->GetDisplay() << " to remove vhost " << vhost->Mask(); + logger.Command(LogType::ADMIN, source, _("{source} used {command} on {0} to remove vhost {1}"), na->GetAccount()->GetDisplay(), vhost->Mask()); source.Reply(_("Vhost \002{0}\002 for \002{1}\002 has been removed."), vhost->Mask(), na->GetAccount()->GetDisplay()); vhost->Delete(); return; @@ -67,7 +67,8 @@ class CommandHSDel : public Command return; } - Log(LOG_ADMIN, source, this) << "on " << na->GetAccount()->GetDisplay(); + logger.Command(LogType::ADMIN, source, _("{source} used {command} on {0}"), na->GetAccount()->GetDisplay()); + #warning "send account" EventManager::Get()->Dispatch(&Event::DeleteVhost::OnDeleteVhost, na); diff --git a/modules/hostserv/off.cpp b/modules/hostserv/off.cpp index e1af7def4..861fd00b8 100644 --- a/modules/hostserv/off.cpp +++ b/modules/hostserv/off.cpp @@ -43,7 +43,7 @@ class CommandHSOff : public Command // XXX vident? u->vhost.clear(); IRCD->Send<messages::VhostDel>(u); - Log(LOG_COMMAND, source, this) << "to disable their vhost"; + logger.Command(LogType::ADMIN, source, _("{source} used {command} to disable their vhost")); source.Reply(_("Your vhost was removed and the normal cloaking restored.")); } diff --git a/modules/hostserv/on.cpp b/modules/hostserv/on.cpp index 3041f65a5..556b2f567 100644 --- a/modules/hostserv/on.cpp +++ b/modules/hostserv/on.cpp @@ -59,7 +59,7 @@ class CommandHSOn : public Command source.Reply(_("Your vhost of \002{0}\002 is now activated."), vhost->Mask()); - Log(LOG_COMMAND, source, this) << "to enable their vhost of " << vhost->Mask(); + logger.Command(LogType::ADMIN, source, _("{source} used {command} to enable their vhost of {0}"), vhost->Mask()); IRCD->Send<messages::VhostSet>(u, vhost->GetIdent(), vhost->GetHost()); u->vhost = vhost->GetHost(); if (IRCD->CanSetVIdent && !vhost->GetIdent().empty()) 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 diff --git a/modules/hostserv/set.cpp b/modules/hostserv/set.cpp index f66c42d8a..8162fa80d 100644 --- a/modules/hostserv/set.cpp +++ b/modules/hostserv/set.cpp @@ -113,6 +113,8 @@ class CommandHSSetDefault : public Command vhost->SetDefault(true); source.Reply(_("Your default vhost is now \002{0}\002."), vhost->Mask()); + + logger.Command(LogType::COMMAND, source, _("{source} used {command} set their default vhost to {0}"), vhost->Mask()); } bool OnHelp(CommandSource &source, const Anope::string &) override |
