quote:
Originally posted by 134jimbodude
That should work but i haven't tested it
Try not to post scripts/snippets if you didn't tested them....
Posting not working scripts can confuse people even more and people willing to learn scripting will learn the wrong things, etc.
(
you actually pointed that out to me once ))
quote:
Originally posted by Jesus
lol thought he meant after a specified amount of time
Before making scripts for people, always make sure you make what is been asked for, or first ask for more details.
eg: "
# key and = key".
-------------------------------------------------------
PS: Jesus (or anyone): you also might wanna read this post regarding timers:
quote:
Originally posted by CookieRevised in "[release] Who's online"
Extremely important note:
Each and every script that uses timers to manipulate or check user related stuff should check if the same user is still signed in when the timer triggers!!!
It should check if it is still the same current user who is signed in and thus only perform the action if the user is the same as the one which started the timer.
Failing todo this will cause many unwanted errors and script behaviours when:
- the user signs out when a timer is still active
- a new user signs in before the timer is triggered and the action when the timer triggers is something like blocking a contact, changing status, retrieving contacts, etc...
All this because timers do not reset and aren't deleted when somebody signs out or when somebody else signs in.
Extremely many scripts make these faults...
Another, and sometimes better/more elegant, solution for the above problem (that is: if possible for the particular script) is to explicitly delete the timer when the user signs out.
Although
134jimbodude's code wouldn't work, he did take this in account as he checked the email address of the signed in user.
-------------------------------------------------------
Also another thing (or actually the same thing as above if you think about it) which makes this script not so strait forward as you might think is that scripts keep running and will not be restarted when other users sign in.
This makes that you should take in account that different users can set different sign out times. In other words, this script should save and load its setting (the set time) in a user specific way (ps: don't use the user's email address for this but rather the user's
userid because of security reasons).