Public feed #889676

Miscellany

public text v1 · immutable
Raw Edit
·published 2008-02-03 02:24 UTC
rendered paste body
Alias away {
  var %x = 1
  var %y = $chan(0)
  var %z = !isincs
  if ($away == $false) {
    set %AC $fulldate
    set %AT $asctime(mmm dd) $+ , $time
    set %AR $1-
    away %AR
    while (%x <= %y) {
      if ($chr(69) %z $chan(%x).mode || $chr(99) %z $chan(%x).mode) {
        describe $chan(%x) 14is now 04away14 for03(04Reason:14 %AR 03(04Time:14 %AT 03))
      }
      inc %x
    }
  }
  else {
    set %AD $duration($calc($ctime - $ctime(%AC)))
    away
    while (%x <= %y) {
      if ($chr(69) %z $chan(%x).mode || $chr(99) %z $chan(%x).mode) {
        describe $chan(%x) 14is now 04back14 from03(04Reason:14 %AR 03(04Left at:14 %AT 03(04Duration:14 %AD 03)))
      }
      inc %x
    }
    unset %AC
    unset %AT
    unset %AR
    unset %AD
  }
}