From 48fa096943c7a46782d185845aed6c3663cc5b2b Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 24 Jan 2011 02:54:09 -0500 Subject: [PATCH] Added %N for network name in dnsbl:reason --- data/example.conf | 3 ++- modules/extra/m_dnsbl.cpp | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/data/example.conf b/data/example.conf index da5e2c25e..a7ee28943 100644 --- a/data/example.conf +++ b/data/example.conf @@ -1837,6 +1837,7 @@ blacklist * %h is the hostname of the user * %i is the IP of the user * %r is the reason (configured below). Will be nothing if not configured. + * %N is the network name set in networkinfo:networkname */ reason = "You are listed in the efnet RBL, visit http://rbl.efnetrbl.org/?i=%i for info" @@ -1852,7 +1853,7 @@ blacklist { name = "dnsbl.dronebl.org" time = 4h - reason = "You have a host listed in the DroneBL. For more information, visit http://dronebl.org/lookup.do?ip=%i" + reason = "You have a host listed in the DroneBL. For more information, visit http://dronebl.org/lookup_branded.do?ip=%i&network=%N" } /* diff --git a/modules/extra/m_dnsbl.cpp b/modules/extra/m_dnsbl.cpp index 756f3c85c..b3f45ceb4 100644 --- a/modules/extra/m_dnsbl.cpp +++ b/modules/extra/m_dnsbl.cpp @@ -52,12 +52,13 @@ class DNSBLResolver : public DNSRequest user->Extend("m_dnsbl_akilled"); Anope::string reason = this->blacklist.reason; - reason = reason.replace_all_ci("%n", user->nick); - reason = reason.replace_all_ci("%u", user->GetIdent()); - reason = reason.replace_all_ci("%g", user->realname); - reason = reason.replace_all_ci("%h", user->host); - reason = reason.replace_all_ci("%i", user->ip.addr()); - reason = reason.replace_all_ci("%r", record_reason); + reason = reason.replace_all_cs("%n", user->nick); + reason = reason.replace_all_cs("%u", user->GetIdent()); + reason = reason.replace_all_cs("%g", user->realname); + reason = reason.replace_all_cs("%h", user->host); + reason = reason.replace_all_cs("%i", user->ip.addr()); + reason = reason.replace_all_cs("%r", record_reason); + reason = reason.replace_all_cs("%N", Config->NetworkName); XLine *x = NULL; if (this->add_to_akill && SGLine && (x = SGLine->Add(NULL, NULL, Anope::string("*@") + user->host, Anope::CurTime + this->blacklist.bantime, reason)))