How to tell if a user is logged into Sametime?

We are going to change our Sametime Server for approximately 400 users. We have already written a script to update the xml file in the background. This part works great unless the user is currently logged into Sametime. (My code actually does the updates, but Sametime overwrites them.)

The question is: How can I tell if a user is currently logged into Sametime? (Using lotusscript or @formula) Or is there a log db somewhere that tracks who is currently connected?

Thank you.

Subject: The information is in your stlog.nsf

It shows login/logouts etc.