Advertisement
debiangr

Untitled

Apr 13th, 2023
636
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.19 KB | None | 0 0
  1. alias -l hc_bantime { return 3600 } ; 3600 = 1 hour , 0 = never expire
  2. alias -l hc_bantype { return 4 } ; 4 = bantype, use /help $mask to change it
  3. alias -l hc_chans { return #test1 } ; channels , use comma to add more
  4.  
  5. ON !*:JOIN:$($hc_chans): {
  6.  
  7.   var %host = $address($nick,2)
  8.   var %domain = $address($nick,4)
  9.   var %fullhost = $address($nick,5)
  10.  
  11.   var %ident = $remove($gettok($gettok(%fullhost,2,33),1,64),~)
  12.  
  13.   if (!$ulist(%domain,host,0))
  14.  
  15.   alias -l hc_do_ban {
  16.     ; $1 = nick
  17.  
  18.     if (!$1) { return }
  19.  
  20.     var %h = $ial($1).host
  21.     var %t = $numtok($hc_chans,44)
  22.     var %i = 1
  23.  
  24.     while (%i <= %t) {
  25.       var %c = $gettok($hc_chans,%i,44)
  26.  
  27.       if ($me ison %c) && ($me isop %c) && ($1 ison %c) {
  28.         if (*.IP iswm %h) { ban $+(-u,$hc_bantime) %c *!*@*. $+ $gettok(%h,3-,46) }
  29.         else { ban $+(-u,$hc_bantime) %c $1 $hc_bantype }
  30.       }
  31.  
  32.       inc %i
  33.     }
  34.   }
  35.  
  36.   alias -l hc_check_is_not_regular {
  37.     ; $1 = nick
  38.  
  39.     var %t = $numtok($hc_chans,44)
  40.     var %i = 1
  41.  
  42.     while (%i <= %t) {
  43.       var %c = $gettok($hc_chans,%i,44)
  44.  
  45.       if ($me ison %c) && ($1 ison %c) && ($1 isreg %c) { return 1 }
  46.  
  47.       inc %i
  48.     }
  49.  
  50.     return 0
  51.   }
  52. }
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement