AutoDeop & AutoDevoice On Idle

Tgh ni.. tengah boring-boring, PakTam (DALNet) ajak buat remote autodevoice bila user idle lebih dari 15 minit.

ON *:JOIN:#: {
  if ($nick == $me) {
    .timer 1 300 checkidle $chan
  }
}
alias checkidle {
  if ($me isop $1) {
    var %i 1
    while (%i < = $nick($1,0,o)) {
      if ($nick($1,%i,o).idle > 300 && $nick($1,%i,o) != $me) {
        .inc %z 1
        var %x = $addtok(%x,$nick($1,%i,o),32)
        if (%z == $modespl) { mode $1 $+(-,$str(o,$modespl)) %x | .unset %x %z }
      }
      .inc %i 1
    }
    mode $1 $+(-,$str(o,$numtok(%x,32))) %x | .unset %z
  }
  .timer 1 5 checkidle2 $1
}
alias checkidle2 {
  if ($me isop $1) {
    var %i 1
    while (%i < = $nick($1,0,v)) {
      if ($nick($1,%i,v).idle > 300 && $nick($1,%i,v) != $me) {
        .inc %z 1
        var %x = $addtok(%x,$nick($1,%i,v),32)
        if (%z == $modespl) { mode $1 $+(-,$str(v,$modespl)) %x | .unset %x %z }
      }
      .inc %i 1
    }
    mode $1 $+(-,$str(v,$numtok(%x,32))) %x | .unset %z
  }
  .timer 1 2000 checkidle $1
}

Remote Massjoin Protection

Satu lagi jenis remote protection adalah Massjoin @ Banjir Masuk Beramai-ramai. Sebelum socket/clone flooding channel, clone2 ini perlu masuk ke channel yg hendak diserang terlebih dahulu.

Remote ini berfungsi untuk menendang keluar clone tersebut dan mengsetkan mode channel +Rml. Ini akan dapat mengurangkan jumlah clone yang masuk ke channel.

alias mjkick {
  var %i = 1
  while (%i < = $numtok(%wipe.mj &#91; $+ &#91; $1 &#93; $+ &#91; $2 &#93; &#93;,32)) {
    kick $1 $2 Massjoin Protection
    .inc %i
  }
}
on @!*:JOIN:#: {
  .set -u3 %wipe.mj &#91; $+ &#91; $cid &#93; $+ &#91; $chan &#93; &#93; $addtok(%wipe.mj &#91; $+ &#91; $cid &#93; $+ &#91; $chan &#93; &#93;,$nick,32)
  if ($numtok(%wipe.mj &#91; $+ &#91; $cid &#93; $+ &#91; $chan &#93; &#93;,32) > 3) {
    mode $chan +Rml $nick(#,0) 
    .timermode $+ $cid $+ $chan 1 10 mode $chan -Rml
    .timermjk $+ $cid $+ $chan 1 2 mjkick $cid $chan
  }
}