rendered paste bodyalias setaway {
set %away.reason $$?="Reason?"
scid -at1 away %away.reason
scid -at1 amsg %in3 $+ now marked as away: %away.reason $+ %out3
}
alias setback {
unset %away.reason
scid -at1 away %away.reason
scid -at1 amsg %in3 $+ returned from away, gone for %in4 $+ $duration($awaytime,1) $+ %out4 $+ %out3
scon -a resetidle
}
alias amsg {
if (!$server) return
var %a 1
while $chan(%a) {
var %a = %a + 1,%b $ifmatch
.raw PRIVMSG %b : $+ $1-
var %Access = $remove($nick(%b,$me).pnick,$me) | echo -i21 %b $timestamp2 %in $+ $iif(%Access != $null, $+($chr(3),$nick(%b,$me).color,$left($v1,1),$chr(3))) $+ $me $+ %out $1-
}
}
on *:text:*:#:{ if ($me isin $1-) && ($awaytime == 0) { .notice $nick Im currently away, I've been away for $duration($awaytime,1) } }
alias checkidle { if ($idle >= 1200) && ($awaytime == 0) { scid -at1 away Auto-Idle | scid -at1 amsg %in3 $+ now marked as away: Auto-Away after 20 minutes idle $+ %out3 } }
alias timeridle { .timer 0 1200 checkidle }
on *:input:*:{
if ($awaytime != 0) {
setback
} }