Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package require http
- bind raw * notice spam:connection
- proc spam:connection {from keyword arg} {
- global spam
- if {[string match -nocase "*Client connecting on port*" $arg]} {
- set web "http://rbl.efnetrbl.org/?i="
- set nick [lindex $arg 0]
- set port [string range [lindex [split [lindex $arg 8] ":"] 0] 0 end]
- set ident [string range [lindex [split [lindex $arg 10] "@"] 0] 1 end]
- set ip [string range [lindex [split [lindex $arg 10] "@"] 1] 0 end-1]
- if {![regexp {[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}} $ip]} {
- set ip [dnslookup $ip web2]
- }
- set connect [::http::geturl $web$ip]
- set files [::http::data $connect]
- if {![isbotnick $nick] && ![onchan $nick #Staff]} {
- return 0
- }
- if {![string match -nocase "*not listed in*" $files]} {
- putnow "KILL $nick :Spam"
- #putnow "GLINE *@$ip 12h Spam"
- putnow "privmsg #Staff :Proxy/Spam IP: $ip"
- ::http::cleanup $files
- }
- }
- }
- proc web2 {ip host status} {
- if {!$status} {return}
- return $ip
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement