Auto-Away

By Ghost-lit Warder on Jul 12, 2007

A simple auto-away. (Will popup in active window/browser, even when not in mIRC, and give a fifteen second warning.) Type: /setauto to activate. Any suggestions and comments would be extremely helpful. Thank you.

  • The original concept of the countdown came from eXclusive Script by fUze.
alias autoawaydialog { dialog -om autoawaydialog autoawaydialog }
dialog autoawaydialog {
  title "Auto Away"
  size -1 -1 92 41
  option dbu
  text "You'll be set as auto away", 1, 7 7 78 8, center
  text "", 2, 7 16 78 8, center
  button "Set", 3, 21 27 25 10, ok
  button "Cancel", 4, 47 27 25 10, cancel
}
on *:dialog:autoawaydialog:init:*: { did -a autoawaydialog 2 on $network in: 15 | %acountdown = 14 | .timerautoaway -i 15 1 countdown }
on *:dialog:autoawaydialog:sclick:*: { 
  if ($did == 3) { .timerautoaway off | dialog -c autoawaydialog | set %nick $me | away Auto away after $calc(%atime / 60) of idle | ame $iif(%ame = On, ame is away [Auto-away $+ / $+ $calc(%atime / 60) minute(s) of idle]) | nick $me $+ |away }
  if ($did == 4) { .resetidle | .timerautoaway off } 
}
alias setauto {
  set %atime $$?="Enter time in seconds. Common: 3600(1 hour), 1800(30 minutes), and 900(15 minutes)."
  set %ame $$?="Ame On or Off"
  .timerautoaway 0 1 /autoaway
}
alias autoaway {
  if ($idle >= %atime) {
    autoawaydialog
  }
}
alias countdown did -a autoawaydialog 2 on $network in: %acountdown | if (%acountdown == 0) { dialog -c autoawaydialog | $iif(%ame = On, ame is away [Auto-away $+ / $+ $calc(%atime / 60) minute(s) of idle]) | set %nick $me | away Auto away after $calc(%atime / 60)) of idle | nick $me $+ |away } | dec %acountdown
alias autoback {
  nick %nick 
  away 
  if (%ame == On) {
    ame is back. [Auto-away/ $+ $calc(%atime / 60) minute(s) of idle.]
    .timerautoaway off
  }
}

Comments

Sign in to comment.
Ghost-lit Warder   -  Aug 15, 2007

Any feedback?

 Respond  
Ghost-lit Warder   -  Aug 12, 2007

Updated. I made it Optional to ame and changed the $calc(%atime * 60) to $calc(%atime / 60) to display the idletime in minutes.

 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.