Untitled
public text v1 · immutablealias awaycheck {
if ($idle > 3600 && !%away) {
awaychans is now set as auto away after $duration($idle) $+ .
set %Away $ctime
}
}
on *:input:#: {
if (%away) {
awaychans is now back after $duration($calc($ctime - %away)) $+ .
unset %away
}
}
on *:connect: timer 0 30 awaycheck
alias awaychans {
var %a = $chan(0), %b = 1
while {%b =< %a) {
if ($chan(%b) != #irpg && $chan(%b) != #idle) {
describe $chan(%b) $1-
inc %b
}
}
}