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-,/(s[3e]ks|anus|pussy|rap[e3]|cum|t[0o]rture|Impr[e3]gn[ae]ti[0o]n|h[0o]m[0o]|s[3e]x|gay|fag|anal|[il]nc[3e]st|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.
MyMalteseFalcon   -  Jul 24, 2017

Hi, I'm interested in this script as we have ppl coming into our channel that are in, bad channels. WE would like to have X ban them to keep them out. I'm a novice at scripting and can use all the help I can get. Thanks you!

simo  -  Jul 26, 2017

you could try changing :

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

To:

alias checkbchan {
.msg X ban $2 $address($1,2)
if ($1 ison $2) { .msg X kick $2 $1 $3- }
}

Let me know if that works.

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.