Auto voice using exceptions - mIRC Snippet | PremiumChat.ro Back

Auto voice using exceptions

mIRC snippets that will give autovoice on joins, but will check also for exceptions for some forbidden channels. (#badboys,#reptiles,#trolling)

alias -l my_channel { return #channel }
on @*:JOIN:$($my_channel): .enable #checkbadchannels | whois $nick

#checkbadchannels off
raw 319:*: if ($check_chans($2-)) { mode $my_channel +v $2 } | .disable #checkbadchannels
alias -l bad_chans { return #badboys,#reptiles,#trolling }
alias -l check_chans {
  tokenize 32 $1- | var %userchans $remove($2-,!,~,&,@,$chr(37),+)
  var %i 1 | while (%i <= $numtok($bad_chans,44)) { 
    if ($istok(%userchans,$gettok($bad_chans,%i,44),32)) { return $false } | inc %i
  }
  return $true
}
#checkbadchannels end