Jump to content

Recommended Posts

Posted

;;Away Script created out of boredom by `666;;
;;To go away or come back you can right click in a channel, query, or status window.;; 
;;Or you may also just do /away and /back;;
;;All of the away settings may be configured by right clicking in a channel, query, or status window;;

menu channel,query,status {
  -
  Away Settings
  .Default Away:/set %Default.msg $$?="What would you like your default away message to be?"
  .Away After Idle:{ var %y/n $input(Would you like to go away after a set amount of time? $+($chr(40),Clicking "No" will remove any previous auto away information,$chr(41)),yvq)
    if (%y/n = $yes) {
      set %idle.time.allowed $$?="How many minutes would you like to be allowed to idle, before auto-away?"
      timeridle.time.check 0 30 Away.Idle.Check
      echo $color(info) * You will now go away automatically after %idle.time.allowed minutes.
    }
    else { 
      $iif(%idle.time.allowed,unset %idle.time.allowed,halt) 
      timeridle.time.check off
    }
  }
  .Message Channel or "/me" channel:/set %Away.meormsg $input(Would you like to "/me" or message the channels? (Choose from the drop-down bar).,meq,Away Settings,Message the channel,/me the channel,Message the channel)
  .Reset All Customs:{ 
    if ($input(Are you sure you wish to reset all your Away Settings?,yw) == $true) {
      unset %away.timezone %idle.time.allowed %away.meormsg %Default.msg %left.at %away.reason %away.ctime
      timeridle.time.check off
      echo $color(info) * All of your Away Customs have been reset.
    }
  }
  .Time Zone on away/back:{ $iif($input(If you wish to have your Time Zone said on away $+ $chr(44) enter it and push Ok. Can't find your's? Type it in. $+($chr(59),$chr(41)),meq,Away Settings,EST,ADST,WST,GMT/UTC,CST,AST,AEST),set %away.timezone $v1,halt)
    echo $color(info) * Time Zone set to $+(%away.timezone,$chr(46))
  }
  Away and Back
  .Away(Reason Specified):{ away $$?="What is your reason for going away? Leave blank for default away." }
  .Away(Default Reason):{ away %default.msg }
  .Back:/back
  -
}
alias -l Away.Idle.Check {
  if ($status == Connected) && ($idle < $calc($eval(%idle.time.allowed,1)*60)) var %Idle = off
  if (%idle != off) { 
    away I have been idle for %idle.time.allowed minutes, and am now away $iif(%default.msg,- %Default.msg,$null)
    timeridle.time.check off
  }
}
alias away {
  set %Left.At $timestamp
  set %Away.Reason $iif($1-,$1-,%default.msg)
  set %Away.Ctime $ctime
  if ($1 == $null) && (%default.msg == $null) { set %away.reason No reason given }
  $iif($eval(%away.meormsg,1) == /me the channel,ame,amsg) I am now away - Reason for leaving: %away.reason - I am leaving at %left.at $iif(%away.timezone,$v1,$null) 
}

alias back {
  $iif($eval(%away.meormsg,1) == /me the channel,ame,amsg) I am now back from my time away - Reason for leaving: %away.reason - I left at $+(%left.at $iif(%away.timezone,$v1,$null),$chr(44)) and was gone for $+($duration($calc($ctime - $eval(%away.ctime,1))),$chr(46))
  unset %left.at %away.reason %away.ctime
  if (%idle.time.allowed) { timeridle.time.check 0 30 Away.Idle.Check } 
}

on *:CONNECT:{
  if (%idle.time.allowed) { timeridle.time.check 0 30 Away.Idle.Check } 
}

-You may set a default reason for going away. 
-Away after specified time idle.
-Choose to message or describe (/me) in the channels for /back and /away.
-Ability to reset back to the default of the script. Instead of just doing /unset for the vars yourself. 
-A fairly "Newby" friendly script, as it tells you when you click on everything what it does, and what you should do.
-Ability to add your Time Zone (You have to set it in the menu) in /away and /back.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...