mirror of
https://github.com/anope/anope.git
synced 2026-07-09 05:43:13 +02:00
Added some more variable fields for dnsbl akill reasons
This commit is contained in:
+7
-1
@@ -1746,7 +1746,13 @@ blacklist
|
||||
name = "rbl.efnetrbl.org";
|
||||
/* How long to set the akill for */
|
||||
time = 4h;
|
||||
/* Reason for akill, %h is replaced with the hostname of the user, and %i with the IP */
|
||||
/* Reason for akill.
|
||||
* %n is the nick of the user
|
||||
* %u is the ident/username of the user
|
||||
* %r is the realname of the user
|
||||
* %h is the hostname of the user
|
||||
* %i is the IP of the user
|
||||
*/
|
||||
reason = "You are listed in the efnet RBL, visit http://rbl.efnetrbl.org/?i=%i for info"
|
||||
}
|
||||
blacklist
|
||||
|
||||
@@ -33,8 +33,11 @@ class DNSBLResolver : public DNSRequest
|
||||
user->Extend("m_dnsbl_akilled");
|
||||
|
||||
Anope::string reason = this->blacklist.reason;
|
||||
reason = reason.replace_all_ci("%i", user->ip.addr());
|
||||
reason = reason.replace_all_ci("%n", user->nick);
|
||||
reason = reason.replace_all_ci("%u", user->GetIdent());
|
||||
reason = reason.replace_all_ci("%r", user->realname);
|
||||
reason = reason.replace_all_ci("%h", user->host);
|
||||
reason = reason.replace_all_ci("%i", user->ip.addr());
|
||||
|
||||
XLine *x = NULL;
|
||||
if (this->add_to_akill && SGLine && (x = SGLine->Add(NULL, NULL, Anope::string("*@") + user->host, Anope::CurTime + this->blacklist.bantime, reason)))
|
||||
|
||||
Reference in New Issue
Block a user