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
}
Like this:
Like Loading...