LaCosaNostra
22-04-2007, 11:39
Since
Some of us would like to keep our ports closed by default
Some of us have the members & access arranged via their forum (http://www.vbulletin.org/forum/showthread.php?t=122221) or some home made web-application, forwhich they made the TeamSpeak Server switch to a MySql database
Now for those ones, who are able to read from TeamSpeaks MySql database already, it would be simplest to also read from there, who's online..
I've checked some of the mysql-files, in the mysql_sql folder.
There's a query for checking te login and fetching the rights.
And there's a query who after that, updates teh last-logged-in date
It would be very simple to add a "1" in an "client_is_online" to mark that person online.
What I unfortunately thusfar haven't seen is a query when a user logs off.
It would be very simple to update the "1" in the "client_is_online" to a "0" to mark that person offline.
Or add a dt_client_lastoffline date column, that gets updated on logoff.
Then when you'd like to query who's online, simply check for the "1" or do some math: where dt_client_lastoffline < dt_client_lastonline
Using this method, there wouldn't be extra recourses,connections and re-calculation of who's online needed.
For this to make, only one mysql-file would have to get updated.
update ts2_clients set
dt_client_lastonline = :dtLastOnline
where
i_client_id = :iClientID;
becomes
update ts2_clients set
dt_client_lastonline = :dtLastOnline,
client_is_online = 1,
where
i_client_id = :iClientID;
But then I can't find any actions being done when someone logs off :(
Any ideas or perhaps can this get added in the next future ?
It's not a waste of space or recourses.. ;)
Some of us would like to keep our ports closed by default
Some of us have the members & access arranged via their forum (http://www.vbulletin.org/forum/showthread.php?t=122221) or some home made web-application, forwhich they made the TeamSpeak Server switch to a MySql database
Now for those ones, who are able to read from TeamSpeaks MySql database already, it would be simplest to also read from there, who's online..
I've checked some of the mysql-files, in the mysql_sql folder.
There's a query for checking te login and fetching the rights.
And there's a query who after that, updates teh last-logged-in date
It would be very simple to add a "1" in an "client_is_online" to mark that person online.
What I unfortunately thusfar haven't seen is a query when a user logs off.
It would be very simple to update the "1" in the "client_is_online" to a "0" to mark that person offline.
Or add a dt_client_lastoffline date column, that gets updated on logoff.
Then when you'd like to query who's online, simply check for the "1" or do some math: where dt_client_lastoffline < dt_client_lastonline
Using this method, there wouldn't be extra recourses,connections and re-calculation of who's online needed.
For this to make, only one mysql-file would have to get updated.
update ts2_clients set
dt_client_lastonline = :dtLastOnline
where
i_client_id = :iClientID;
becomes
update ts2_clients set
dt_client_lastonline = :dtLastOnline,
client_is_online = 1,
where
i_client_id = :iClientID;
But then I can't find any actions being done when someone logs off :(
Any ideas or perhaps can this get added in the next future ?
It's not a waste of space or recourses.. ;)