Silent Away Cross-Network v1.0

By newklear on Oct 11, 2008

Silent Away Cross-Network Script

This script puts you away silently without telling the whole world.
I find it quiet irritating especially when on numerous networks and channels that people beep you or jump into your privates when going away or coming back. This script enables you to go away silently and come back silently without messaging every channel and network your status.

If someone says your nick in channel or query the script will let them know of your status.
This script will probably suite someone more with numerous GF's that need to be discreet.

Usage:
/gone
/gone <--- Sets you away with the default message AFK
/back <--- Brings you back silently

Also if you forget to set yourself as back as soon as you make an input the script will set you back.
If you are Disconnected and rejoin while set as away you will be set back as away with your previous away message.

This is my first Away Snippet so any feedback would be greatly appreciated, If I did something wrong and should do it better please don't call me nub as I know I am one already ok, so no need to rub it in please, at least I try and I sit many hours reading the Help File.

Thank you kindly and hopefully this is of some use for some.

;******* Silent Away Cross-Network Script Version 1.0 by Kasbah
;******* Usage:
;*******/gone <Away message>
;*******/gone <--- Sets you away with the default message AFK
;*******/back <--- Brings you back silently

on *:START: {
echo SilentAway Cross-Network Script Still Loaded
echo Usage: /gone <away message> and /back
}

on *:CONNECT: {
if (%Kaway == on) {
.scon -a away %Kawaymsg
.enable #Beep
echo You Just Reconnected at $time $date and are still set as away with the message %Kawaymsg
}
}

alias gone {
  .scon -a away $iif(!$1,AFK,$1-)
  echo Away System On
  set %Kaway on
  set %Kawaymsg $iif(!$1,AFK,$1-)
  .enable #Beep
}

alias back {
  .scon -a away
  echo Away System Off 
  .unset %Kaway
  .disable #Beep
  echo I am now back from $awaymsg $+ , After: $duration($awaytime) seconds
}

;***To be sneaky you can change "on *:INPUT:*: {"
;***To "on *:INPUT:#: {" if you want to say hi to one of your GF's quickly. 
on *:INPUT:*: {
  if ($away) {
    $back
  }
}

#Beep off
on *:TEXT:$( * $+ $me $+ * ):#: {
  if (%Kaway == on) && ( %flood [ $+ [ $address($nick,2) ] ] != on) {
    .notice $nick I am currently away. My awaytime is: $duration($awaytime) $+ . ( $+ %Kaway $+ )
    set -u60 %flood [ $+ [ $address($nick,2) ] ] on
  }
}
on *:TEXT:*:?: {
  if (%Kaway == on) && ( %flood [ $+ [ $address($nick,2) ] ] != on) { 
    .msg $nick I am currently away. My awaytime is: $duration($awaytime) $+ . ( $+ %Kaway $+ )
    set -u60 %flood [ $+ [ $address($nick,2) ] ] on
  }
}
#Beep end

Comments

Sign in to comment.
Anish   -  Oct 28, 2008

nice job , I like it :)

 Respond  
newklear   -  Oct 12, 2008

wow thank you so much napa182 - Been reading all about $iif() and it's usage, actually makes alot of sense lol: $iif(Condition_is_met,True,False) <-- Gosh I love it, that definately does make things alot neater and cleaner. Thank you once again napa182. Now I am so amped to see where else I can use $iif()

Thank you rhasttaff Boetie :) /me goes to see what else to do that is useful to mankind.
types in /help what_else_can_we_get_upto and reads

Thank you for the nice rating guys :)

**** Added napa182's suggestion to the snippet

 Respond  
rhasttaff   -  Oct 12, 2008

very nice from your 1° post brother ;)

keep working :)

Jah Bless´´

 Respond  
napa182   -  Oct 11, 2008

look into /help $iif
um you can shorten this

alias gone {
  if (!$1) {  
    .scon -a away AFK
    echo Away System On
    .set %Kaway on
    .set %Kawaymsg AFK
    .enable #Beep
    halt
  }
  .scon -a away $1-
  echo Away System On
  .set %Kaway on
  .set %Kawaymsg $1-
  .enable #Beep
}

into this

alias gone { 
  .scon -a away $iif(!$1,AFK,$1-)
  echo Away System On
  set %Kaway on
  set %Kawaymsg $iif(!$1,AFK,$1-)
  .enable #Beep
}

keep up the coding

 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.