I'm creating a chat system and I need to remove every user that did not properly logout (if for instance the computer was shutdown unexpectedly,...), such as some other tasks.
One possibility is for each user's script check for inactivity (3 seconds, for instance) of every other user, but if there are many users online I think I may get in trouble on performance.
Is there an easier way to do this? Is it possible to run a script automatically on the server that performs such task? how?
My thanks in advanced