daily pastebin goal
40%
SHARE
TWEET

DroneBL Check (For Bot)

Seb Aug 1st, 2011 (edited) 429 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #################
  2. # This version is modified with 4 bl checks only (its plenty)
  3. # This version is made to be used on a bot
  4. # When loaded, type this in the channels where you want to use the tool
  5. # --> .chanset #Chan +dronebl
  6. # Then use:  !bl ip.ip.ip.ip
  7. # New Credits: KingSlayer @ Freenode
  8. #################
  9.  
  10. alias revip { tokenize 46 $1 | return $+($4, ., $3, ., $2, ., $1) }
  11.  
  12. on *:text:.chanset *:#:{
  13.   if ($nick !isop $chan) { msg # you need @ to use .chanset | halt }
  14.   if (!$3) { msg # [4Error] type .chanset <#Chan> <+/-Script> | halt }
  15.   if ($chan == $2) && ($3 == +dronebl) { set %blchans $addtok(%blchans,$2,44) | msg # Performed +dronebl on # | halt }
  16.   if ($chan == $2) && ($3 == -dronebl) { set %blchans $remtok(%blchans,$2,1,44) | msg # Performed -dronebl on # | halt }
  17. }
  18.  
  19. on *:text:!bl *:%blchans:{
  20.   if (!$2) { msg # its !bl <ip.ip.ip.ip> | halt }
  21.   if ($nick isreg $chan) { halt }
  22.   msg # Looking up, one moment..
  23.   set %hit::1 3Clear | set %hit::2 3Clear | set %hit::3 3Clear | set %hit::4 3Clear
  24.   set %bl.chan #
  25.   proxycheck $2
  26. }
  27.  
  28. alias proxycheck {
  29.   if ($1 == $null) { echo $color(notice) * Missing parameters: /proxycheck <ip> or to check your own ip /proxycheck localhost }
  30.   else {
  31.     if ($1 == localhost) { set %dnscheckproxy 1 | set %checkip $ip | proxycheck.progress | halt }
  32.     else { set %dnscheckproxy 1 | set %checkip $1 | proxycheck.progress }
  33.   }
  34. }
  35.  
  36. alias -l proxycheck.progress {
  37.   .timer 1 1 dronebl | .timer 1 2 proxybl
  38.   .timer 1 4 rbl.efnet.org | .timer 1 5 dnsbl.swiftbl.org
  39.   .timer 1 6 saybl
  40. }
  41.  
  42. alias -l dronebl { set %dbl dnsbl.dronebl.org | dns $revip(%checkip) $+ .dnsbl.dronebl.org }
  43. alias -l proxybl { set %dbl dnsbl.proxybl.org | dns $revip(%checkip) $+ .dnsbl.proxybl.org }
  44. alias -l rbl.efnet.org { set %dbl rbl.efnet.org | dns $revip(%checkip) $+ .rbl.efnet.org }
  45. alias -l dnsbl.swiftbl.org { set %dbl dnsbl.swiftbl.org | dns $revip(%checkip) $+ .dnsbl.swiftbl.org }
  46.  
  47. alias -l saybl {
  48.   msg %bl.chan DroneBl Result $+([dronebl.org: %hit::1, ]) $+([proxybl.org: %hit::2, ]) $+([rbl.efnet.org: %hit::3, ]) $+([dnsbl.swiftbl.org: %hit::4, ])
  49. }
  50.  
  51.  
  52. on *:DNS:{
  53.   if (%dnscheckproxy == 1) {
  54.     if (%dbl == dnsbl.dronebl.org) {
  55.       if ($iaddress != $null) {
  56.       set %hit::1 4Found }  
  57.       else { set %hit::1 3Clear }
  58.     }
  59.     if (%dbl == dnsbl.proxybl.org) {
  60.       if ($iaddress != $null) {
  61.       set %hit::2 4Found }  
  62.       else { set %hit::2 3Clear }
  63.     }
  64.     if (%dbl == rbl.efnet.org) {
  65.       if ($iaddress != $null) {
  66.       set %hit::3 4Found }
  67.       else { set %hit::3 3Clear }
  68.     }
  69.     if (%dbl == dnsbl.swiftbl.org) {
  70.       if ($iaddress != $null) {
  71.       set %hit::4 4Found }
  72.       else { set %hit::4 3Clear }
  73.     }  
  74.     unset %dbl | unset %dnsproxycheck
  75.   }
  76. }
RAW Paste Data
Top