All pastes #639103 Raw Edit

Untitled

public text v1 · immutable
#639103 ·published 2007-07-30 10:19 UTC
rendered paste body
alias 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
    }
  }
}