Simple away snippet

By Fuzionx on Dec 12, 2011

Just a simple, yet affective, away snippet. Add to a new remote file.

Usage:

  • /afk [reason]
    Sets your status to away, adds "|AFK" to you main nickname and messages every channel with your away message.

  • /back
    Messages every channel that you're back with the time you've been away, unsets your away status and changes your nickname back to your main nick.

You may want to add a re-identify at the /back command if your main and away nickname aren't in the same group.
Add this line of code to after "nick $mnick":

msg NickServ IDENTIFY [password]

Change [password] to your NickServ password.

Modify as needed.

alias afk {
  if (!$away) {
    away $iif($1,$1,Away From Keyboard)
    tnick $mnick $+ |AFK
    ame is now away. Reason: $awaymsg
  }
  else {
    echo $color(info) -at You're already marked as away. ( $+ $awaymsg $+ )
}

alias back {
  if ($away) {
    ame is now back from: $awaymsg $+ . Been away for: $duration($awaytime)
    away
    nick $mnick
  }
  else {
    echo $color(info) -at You're not away.
  }
}

Comments

Sign in to comment.
Frenetic   -  Dec 13, 2011

Sure; also, it's nice and simple not some over-done dialog one with billions of features, which is nice to see. Lol. :)

 Respond  
Fuzionx   -  Dec 13, 2011

Yeah it's up to you if leave it there or replace/delete it. Thanks for the heads up.

 Respond  
Frenetic   -  Dec 13, 2011

Some networks kill you automatically, if you use AME, AMSG and so. So becareful.

 Respond  
Fuzionx   -  Dec 13, 2011

@xdesoto
Usually, at least I have, people have both their main and away nickname grouped so there is no need to re-identify. Although if you don't have them grouped you might want to add it. I added the suggestion to the description. Thanks for pointing it out.

@ProSec
Oh I completely forgot about an if (!$away) check at /afk. Thanks for the tips ;)
Added a check on /afk and an error message on both aliases.

 Respond  
Protheus   -  Dec 12, 2011

Might want to add something at the end like
else {
echo -a You are already marked as being back.
}
As well as something for the away like
else {
echo -a You are already marked as away with message $awaymsg.
}
Just a suggestion.

 Respond  
xdesoto   -  Dec 12, 2011

msg nickserv identify pass or if it's chatspace pass password

 Respond  
xdesoto   -  Dec 12, 2011

May want to add the section for auto pass when you go back to your main Nick

 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.