Advertisement
westor

Join BadIPS for Kendy v2.1

Sep 7th, 2020 (edited)
2,671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.75 KB | None | 0 0
  1. alias -l txt { return $mircdir $+ badips.txt }
  2.  
  3. ON *:START: {
  4.   if (!$file($txt)) { return }
  5.  
  6.   window -hj100000000000 @BADIPS
  7.   loadbuf @BADIPS $qt($txt)
  8.  
  9.   .timer[CHECK_BADIPS_FILE_RELOAD] -o 0 60 badip_file_reload
  10. }
  11.  
  12. ON !*:JOIN:#: {
  13.   var %ip = $gettok($site,1-2,46)
  14.  
  15.   if (%ip) && ($check_badip(%ip)) { ban -ku60 $chan $nick 2 Your IP ( $+ $site $+ ) is blacklisted - Email to KendyDaVang@gmail.com for removal! }
  16. }
  17.  
  18. alias badip_file_reload {
  19.   if ($window(@BADIPS)) { window -c $v1 }
  20.  
  21.   if ($file($txt)) {
  22.     window -hj100000000000 @BADIPS
  23.     loadbuf @BADIPS $qt($txt)
  24.   }
  25. }
  26.  
  27. alias check_badip {
  28.   if (!$window(@BADIPS)) || (!$line(@BADIPS,0)) { return }
  29.  
  30.   var %r = $fline(@BADIPS,$1,0)
  31.  
  32.   if (%r) { return %r }
  33.  
  34.   return 0
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement