diff options
author | Adam <Adam@anope.org> | 2011-01-24 02:54:09 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-01-24 02:54:09 -0500 |
commit | 48fa096943c7a46782d185845aed6c3663cc5b2b (patch) | |
tree | d8f96ca3a2980c9c32a272a2fce6377afa2122de | |
parent | bf559d788fdbb12906a2126f5b850b46dab9d702 (diff) |
Added %N for network name in dnsbl:reason
-rw-r--r-- | data/example.conf | 3 | ||||
-rw-r--r-- | 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))) |