quickaway; multiserver away

By XRaGeX on Sep 22, 2007

Well, I have been gone a while and picked up some new tricks, like not naming my scripts XRAGEX.

Hehe, I am back a new person, and i wanted to test how much ive learned and forgotten...

There is a Menu For this system, but if your prefer the alias, it has that too.

/aw (reason) for the away.
/bk to become back from where ever you were.

Please Enjoy!

; quickaway sys.
; by brandon (Paradox, Metal980, XRageX)

alias away_reason { return %away }
on *:text:*:?:{
  if ($away == $true) {
    .msg $nick (away; - $away_reason $+ )
  }
}
on *:text:*:#:{
  if ($away == $true) && ($me isin $1-) {
    .msg $chan (away; - $away_reason $+ )
  }
}
alias aw {
  if ($away == $false) {
    set %away $1-
    .scid -a /amsg (away; - $away_reason $+ )
    .scid -a /away (away; - $away_reason $+ ) 
  }
}
alias bk {
  if ($away == $true) {
    unset %away $1-
    .scid -a /amsg (back; - $away_reason $+ )
    .scid -a /away
  }
}
menu * {
  -
  [quickaway]
  .multiserver away system
  .$iif($away == $true,Return Back): /bk
  .$iif($away == $false,Go Away): /aw $$?="Enter Away Reason Or Press Cancel."
  -
}

Comments

Sign in to comment.
token   -  Sep 23, 2007

why is the $away_reason needed? you are better off with just the %away variable. in the if ($away == $true) you could just use if ($away) and same goes for the $false, just make it if (!$away). the snippet itself is extremely simple, i would add more configuration to everything. 2/10

 Respond  
MightyKiller   -  Sep 23, 2007

Problem In Back From Away , Secondly Add Time Thing In This Code.

 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.