BAN/QUIET

BAN/QUIET

mIRC snippet with nick protection on quite ban mode: If user doesn't change nick with allowed one, he'll be kicked out. If user change nick with regular one, then he'll get unbanned from quiet.

Postat de Copyright Categorie Review user Vizualizari Data
BLKoldSUN Fernet protections Cod testat 315 2025-06-25 21:07:25

on *:JOIN:#test,#chan1,#chan2,#chan3,#chan4,#chan5:{
  if ($nick($chan,$me,@%&~)) {
    if ($round($calc($regex($nick,/[A-Z]/g) / $regex($nick,/[A-Za-z]/g) * 100),0) > 40) {
      if ($+(~q:,$address($nick,2)) !isban $chan) { putmode $chan +b $+(~q:,$address($nick,2))  } 
    } 
  }
}



ON  *:nick: {
  var %loopnckz = 1
  while ( $comchan($newnick,%loopnckz) != $null )  {
    var %chan $v1   
    if (!$istok(#test #chan1 #chan2 #chan3 #chan4 #chan5 ,%chan,32)) { break }  	
    if ($nick(%chan,$me,@%&~)) {
      if ($round($calc($regex($newnick,/[A-Z]/g) / $regex($newnick,/[A-Za-z]/g) * 100),0) > 40) { 
        if ($newnick isvoice %chan) { putmode %chan -v $newnick }
        if ($+(~q:,$address($newnick,2)) !isban %chan) { putmode %chan +b $+(~q:,$address($newnick,2))  } 
      }
      inc %loopnckz
    }
  }
}