All pastes #1066257 Raw Edit

Away Script

public text v1 · immutable
#1066257 ·published 2008-07-09 03:50 UTC
rendered paste body
Alias away {
  if ($network == SwiftIRC) {
    if ($away == $false) {
      set %AA $ctime
      set %AB $asctime(mmm dd)
      set %AC $asctime(hh:nn:sstt)
      set %AD $$1-
      away Away for: %AD - Left on %AB at %AC
      ame is away for: %AD - Left on %AB at %AC $+ .
    }
    if ($away == $true) {
      set %AE $duration($calc($ctime - %AA))
      ame is back from: %AD - Left on %AB at %AC - Gone for %AE $+ .
      away
      unset %AA
      unset %AB
      unset %AC
      unset %AD
      unset %AE
    }
  }
}
on *:DISCONNECT: { 
  if (%AA) {
    unset %AA
  }
  if (%AB) {
    unset %AB
  }
  if (%AC) {
    unset %AC
  }
  if (%AD) {
    unset %AD
  }
  if (%AE) {
    unset %AE
  }
}