RE: [BETA] Imitate Script
MrT,
To add to what phalanxii has said: you need to take into consideration that several contacts can talk to you at the same time. And that a user could want to imitate a contact who hasn't spoken last.
So only storing the last text parameters from the last contact who spoke to the user is not going to work. Do as phalanxii suggested: use an array to store the information, indexed by the contact's email _and_ by the user's email(**). And remove the array element when the chat window of that contact is closed(***).
** highly important if you don't want to screw things up when the current user signs out and a new user sign in. Another way around this and probably much more convenient in this case: empty the array when the user signs out.
*** be carefull. There can be multiple contacts in 1 chat window (multi-contact or group chats).
PS: without looking at the code: I can't see the use of my "typing notifier" code in this script though.
This post was edited on 11-05-2006 at 11:22 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
|