Auto Away Script

Moderator: GeekShed.Net Staff

Auto Away Script

Postby Phil » Thu Nov 05, 2009 6:01 pm

The more observant of you may have noticed the userlist on the site. If not, it's accessed by clicking on any of the user counts at http://www.geekshed.net/chat/chat-rooms/.

If you click the Xs in the away column of that list, it shows the reason why the user is away.

To effectively update that column with an X or tick when you are away here, you can use the following script. It sets you as away after 30 mins idle and sets you as back when you return.

Code: Select all
See Below...
Phil
 
Posts: 142
Joined: Thu Oct 22, 2009 8:16 pm

Re: Auto Away Script

Postby Phil » Fri Nov 06, 2009 12:34 pm

Eh, slight logic error in original code - fixed now...

Code: Select all
on 1:START:{
  set %autoaway.away 0
  .timerautoaway 0 1800 doautoaway
}

on 1:INPUT:*:{
  if (%autoaway.away == 1) {
    raw away
    echo -a 6Auto away deactivated
    set %autoaway.away 0
  }

  .timerautoaway 0 1800 doautoaway
}

alias doautoaway {
  if (%autoaway.away == 0) {
    raw away Auto away after 30 mins idle
    echo -a 6Auto away active
    set %autoaway.away 1
  }
}
Phil
 
Posts: 142
Joined: Thu Oct 22, 2009 8:16 pm

Re: Auto Away Script

Postby Pctech37 » Tue Nov 10, 2009 7:51 pm

Why use .'s and not /'s
Pctech37
"31337 h4X0rZ" and student
#Pctech37 Founder
Image
Pctech37
 
Posts: 26
Joined: Sat Nov 07, 2009 2:11 am
Location: Everett, Washington, United States of America

Re: Auto Away Script

Postby SharpY » Tue Nov 17, 2009 6:42 pm

Pctech37 wrote:Why use .'s and not /'s


So that the messages don't show up on your screen ever, they are simply automatically done silently.
SharpY
 
Posts: 7
Joined: Mon Nov 09, 2009 10:18 pm


Return to Script help

Who is online

Users browsing this forum: No registered users and 1 guest

cron