All pastes #104451 Raw Edit

...

public text v1 · immutable
#104451 ·published 2006-07-28 22:07 UTC
rendered paste body
#notice off
; notifies a user that says your name while you are away that you are 
; away
on *:text:*:*:{
  if (($away) && ($me isincs $1-)) {
    if (!$eval($+(%,away.floodprot.,$nick),2)) {
      ; he doesn't have a variable set like %away.floodprot.hisnick so we
      ; tell him we're away
      set %away.message $+([,$left($awaymsg,-14)) $+ ]
      set %away.since $+([,$left($right($awaymsg,6),-1))) $+ $asctime(tt) $+ ]
      set %away.for $+([,$duration($awaytime),])
      /me is back $chr(124) Back from: %away.message - Since: %away.since - For: %away.for
      ; and set the variable %away.floodprot.hisnick with /set to be 
      ; unset in 5 seconds
      set -u5 %away.floodprot. $+ $nick 1
    }
  }
}
on *:notice:*:*:{
  if ($away) {
    if (!$eval($+(%,away.floodprot.,$nick),2)) {
      ; he doesn't have a variable set like %away.floodprot.hisnick so we
      ; tell him we're away
      set %away.message $+([,$left($awaymsg,-14)) $+ ]
      set %away.since $+([,$left($right($awaymsg,6),-1))) $+ $asctime(tt) $+ ]
      set %away.for $+([,$duration($awaytime),])
      /me is back $chr(124) Back from: %away.message - Since: %away.since - For: %away.for
      ; and set the variable %away.floodprot.hisnick with /set to be 
      ; unset in 5 seconds
      set -u5 %away.floodprot. $+ $nick 1
    }
  }
}