Simple Away Script

By Pepsi_Man0077 on Jan 22, 2008

Paste into remotes and type

/away
or
/back

on *:TEXT:*:#: {
  if ($me isin $1-) && (%away = ON) {
    if (%away.none) { msg $chan 14I am currently away: $+ 9 no reason given $+ 14 ... I have been gone for $+ 9 $duration($calc($ctime - %ctime))
    }
    else {
      msg $chan 14I am currently away: $+ 9 $hget(away,awayreason) $+ 14 ... I have been gone for $+ 9 $duration($calc($ctime - %ctime))
    }
  }
}
Alias away { 
  if (%away = OFF) {
    set %ctime $ctime
    set %away ON
    if ($1) { 
      amsg 14 I have just left: 9 $+ $1- $+ 14 Who knows when ill be back?
      hadd -m away awayreason $1-
    }
    else { 
      amsg 14 I have just left: 9 no reason given $+ 14... Who knows when ill be back?
      set %away.none
    }
  }
  else ( echo 14 You are already marked as away!!
}
Alias back {
  away
  if (%away = ON) {
    set %away OFF 
    if (%away.none) {
      amsg 14I am back from: 9 $+ no reason given $+ 14 I was gone for $+ 9 $duration($calc($ctime - %ctime))
    }
    else { 
      amsg 14I am back from: 9 $+ $hget(away,awayreason) $+ 14 I was gone for $+ 9 $duration($calc($ctime - %ctime))
      hdel  away awayreason
    }
    unset %ctime
  }
  else { 
    echo 14 You arent away!! 
  }
}
on *:LOAD: {
  set %away OFF
}

Comments

Sign in to comment.
Pepsi_Man0077   -  Jan 29, 2008

thanks, ill change it when i get around to it.

 Respond  
G13AoUsTiS   -  Jan 25, 2008

why not :

Alias away {
if ($away == $false) {
;rest of commands

?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.