use !seek to seek any away (or idle for over than 30m) user in channel and if there is one, it'll deop the user.
use !seek auto to auto seek every 60mins
i had this lying around and user@the forums asked for something like this and i cant, god knows why, answer in forums.
THIS IS A BOT SCRIPT.
on *:text:!seek*:#:{
if ($timer(seekandestroy).secs) {
if (!%awarn) {
msg $chan !seek is in Auto-Pilot :) next check in $duration($timer(seekandestroy).secs),1)
set %awarn 1
timerawarn 1 60 unset %awarn
}
}
else {
if ($2 == auto) { who $chan | timerseekandestroy 0 3600 who $chan }
if (!$2) { who $chan }
}
}
alias who {
set %chan $1
who $1-
}
#352 on
;raw *:*:{ echo -s $numeric $1- }
raw 352:*:{
if ($6 != $me) {
if (G isin $7) || ($nick(%chan,$6).idle > 1800) { write awayu.sys $6 }
}
}
raw 315:*:{
var %y = 1
var %z = 0
while (%y <= $lines(awayu.sys)) {
if ($read(awayu.sys,%y) isop %chan) {
set %awayu $addtok(%awayu,$read(awayu.sys,%y),32)
inc %z
}
inc %y
}
mode %chan -o $+ $str(o,$numtok(%awayu,32)) %awayu
if (%z) { msg %chan These nicks are set as away or were idling for more than $duration(1800,2) }
;unset %awayu
}
#352 end
Just making a review since not much is going on here at Hawkee at the moment. I'm just demonstrating another way of looping through the awayu.sys with mIRC's file handling:
raw 315:*:{
var %y = 1
var %z = 0
while (%y <= $lines(awayu.sys)) {
if ($read(awayu.sys,%y) isop %chan) {
set %awayu $addtok(%awayu,$read(awayu.sys,%y),32)
inc %z
}
inc %y
}
mode %chan -o $+ $str(o,$numtok(%awayu,32)) %awayu
if (%z) { msg %chan These nicks are set as away or were idling for more than $duration(1800,2) }
}
can be done as:
raw 315:*:{
.fopen op awayu.sys
while (!$feof) && (!$ferr) {
if ($fread(op) isop %chan) {
set %awayu $addtok(%awayu,$v1,32)
}
}
.fclose op
mode %chan $+(-,$str(o,$numtok(%awayu,32)) %awayu)
if (%z) { msg %chan These nicks are set as away or were idling for more than $duration(1800,2) }
}