All pastes #413877 Raw Edit

Stuff

public text v1 · immutable
#413877 ·published 2007-03-28 19:10 UTC
rendered paste body
on *:TEXT:!away*:#: {
  if (!$2) || (!$3) {
    notice $nick Please use this syntax: !away <status> <reason>
  }
  else {
    set %awayreason [ $+ [ $nick ] ] $3-
    set %awaystatus [ $+ [ $nick ] ] $2
    set %away [ $+ [ $nick ] ] on
    msg $chan $+ $nick has changed his status to: %awaystatus [ $+ [ $nick ] ] Reason: %awayreason [ $+ [ $nick ] ] $+ .
  }
}

on *:TEXT:!check*:#: {
  if (%away [ $+ [ $2 ] ] == on) {
    msg $chan $+ $2 is currently: %awaystatus [ $+ [ $2 ] ] Reason: %awayreason [ $+ [ $2 ] ] $+ .
  }
  else {
    msg $chan $+ $2 is currently NOT away.
  }
}

on *:TEXT:*:#: {
  if (%away [ $+ [ $nick ] ] == on) {
    msg $chan $+ $nick is now back from: %awayreason [ $+ [ $nick ] ] $+ .
    unset %awayreason [ $+ [ $nick ] ]
    unset %awaystatus [ $+ [ $nick ] ]
    unset %away [ $+ [ $nick ] ]   
  }
  else { halt }
}