summaryrefslogtreecommitdiff
path: root/modules/proxyscan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/proxyscan.cpp')
-rw-r--r--modules/proxyscan.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/proxyscan.cpp b/modules/proxyscan.cpp
index 8b814ec0a..4984034d7 100644
--- a/modules/proxyscan.cpp
+++ b/modules/proxyscan.cpp
@@ -84,11 +84,11 @@ public:
protected:
void Ban()
{
- Anope::string reason = this->proxy.reason;
-
- reason = reason.replace_all_cs("%t", this->GetType());
- reason = reason.replace_all_cs("%i", this->conaddr.addr());
- reason = reason.replace_all_cs("%p", Anope::ToString(this->conaddr.port()));
+ auto reason = Anope::Template(this->proxy.reason, {
+ { "ip", this->conaddr.addr() },
+ { "port", Anope::ToString(this->conaddr.port()) },
+ { "type", this->GetType() },
+ });
BotInfo *OperServ = Config->GetClient("OperServ");
Log(OperServ) << "PROXYSCAN: Open " << this->GetType() << " proxy found on " << this->conaddr.str() << " (" << reason << ")";