Advertisement
Guest User

Untitled

a guest
Jul 31st, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. package require http
  2. bind raw * notice spam:connection
  3. proc spam:connection {from keyword arg} {
  4. global spam
  5. if {[string match -nocase "*Client connecting on port*" $arg]} {
  6. set web "http://rbl.efnetrbl.org/?i="
  7. set nick [lindex $arg 0]
  8. set port [string range [lindex [split [lindex $arg 8] ":"] 0] 0 end]
  9. set ident [string range [lindex [split [lindex $arg 10] "@"] 0] 1 end]
  10. set ip [string range [lindex [split [lindex $arg 10] "@"] 1] 0 end-1]
  11. if {![regexp {[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}} $ip]} {
  12. set ip [dnslookup $ip web2]
  13. }
  14. set connect [::http::geturl $web$ip]
  15. set files [::http::data $connect]
  16. if {![isbotnick $nick] && ![onchan $nick #Staff]} {
  17. return 0
  18. }
  19. if {![string match -nocase "*not listed in*" $files]} {
  20. putnow "KILL $nick :Spam"
  21. #putnow "GLINE *@$ip 12h Spam"
  22. putnow "privmsg #Staff :Proxy/Spam IP: $ip"
  23. ::http::cleanup $files
  24. }
  25. }
  26. }
  27. proc web2 {ip host status} {
  28. if {!$status} {return}
  29. return $ip
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement