bad channel check and ban on all channels you have access in

By simo on May 28, 2017

This will check for bad channel on join and set ban on all channels you have access like: chanOP
this saves u the trouble if they join on another of ur channels to start all over again

    menu channel {
-
$iif($eval($+(%,checkbadchan.,$network,.,$chan),2)  == $true,$style(1)) checkbadchan :{ set %checkbadchan. [ $+ [ $network ] $+ . $+ [ $chan ] ] $iif(%checkbadchan. [ $+ [ $network ] $+ . $+ [ $chan ] ] == $false,$true,$false) | echo -a 7>4Attention7<  $+ $color(ctcp) checkbadchan is now $iif($eval($+(%,checkbadchan.,$network,.,$chan),2)  == $true, $+($chr(3),00,$chr(44),03,$chr(32),ON,$chr(32),$chr(3)),$+($chr(3),01,$chr(44),14,$chr(32),OFF,$chr(32),$chr(3)))   $+ $color(ctcp)  for  $iif($eval($+(%,checkbadchan.,$network,.,$chan),2)  == $true, $+($chr(3),00,$chr(44),03,$chr(32),$chan,$chr(32),$chr(3)),$+($chr(3),01,$chr(44),14,$chr(32),$chan,$chr(32),$chr(3))) }
-
}

ON !*:JOIN:#: { 
  if (%checkbadchan. [ $+ [ $network ] $+ . $+ [ $chan ] ] == $true) { 
    if ($nick($chan,$me,@&~%)) { 
      whois $nick 
      set -u5 %checkbadchanz on 
    } 
  }
}

Raw *:*: { 
  if ($istok(301 307 308 310 311 312 313 317 318 320 330 335 338 378 379 401,$numeric,32)) { haltdef }
  if ($numeric == 319) {
    if ($regex($3-,/(seks|anus|pussy|rape|cum|t[0o]rture|Impregnati[0o]n|h[0o]m[0o]|s[3e]x|gay|fag|anal|incest|asswh[0o]l[3e]|cunt|p[0o]rn|[fs]uck)/i) && %checkbadchanz == on ) {
      var %t = 1
      while ($chan(%t)) {
        var %badchanz $ifmatch
        if ($nick(%badchanz,$me,@%&~)) {  checkbchan $2 %badchanz  --[Bad & OR Spam Channel Detected]--   }
        inc %t
        inc %kc
      } 
    }
    haltdef
  } 
}

alias checkbchan {
  mode $2 +b $address($1,2)  
  if ($1 ison $2) {  kick $2 $1 $3- }
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.