summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-09-19 16:20:56 -0400
committerAdam <Adam@anope.org>2010-09-19 16:20:56 -0400
commitf8ee95ef989b83d9af7f802a25a8c7d9f81dd116 (patch)
tree544f41f56d1eb5df8d29d61478bbb3e10bf1ce30
parent1e3d2f3739ceaddabb0b1255a840e4d6ffbd6e66 (diff)
Added some more variable fields for dnsbl akill reasons
-rw-r--r--data/example.conf8
-rw-r--r--modules/extra/m_dnsbl.cpp5
2 files changed, 11 insertions, 2 deletions
diff --git a/data/example.conf b/data/example.conf
index 7750b4d2d..639077f65 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -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
diff --git a/modules/extra/m_dnsbl.cpp b/modules/extra/m_dnsbl.cpp
index 6360c3753..d123fd974 100644
--- a/modules/extra/m_dnsbl.cpp
+++ b/modules/extra/m_dnsbl.cpp
@@ -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)))