One question, and one comment.
Question: Why use a hash table for that at all?
Comment: That script does not send any messages, whether away is set or not.
laugh