1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 04:33:14 +02:00

Added %N for network name in dnsbl:reason

This commit is contained in:
Adam
2011-01-24 02:54:09 -05:00
parent bf559d788f
commit 48fa096943
2 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -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"
}
/*
+7 -6
View File
@@ -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)))