I'm trying to think of an efficient way to display a list of all usernames that are logged in to my application on a HTML page somewhere outside of my application.
Off the top of my head, all I can think of is looping through all zones/rooms and getting usernames, then creating an extension that saves this list of users to a text file that I can then call from my html page.
A more integrated way I guess would be to update my user database table with a flag 'in=1'.
Questions:
- Can anyone think of a Smartfox method to list all usernames logged in to my application?
- Any other ideas on how to achieve what I'm after?
Save a list of all users logged in to a file
Save a list of all users logged in to a file
Last edited by mixart on 30 Mar 2010, 09:30, edited 1 time in total.
The database part was not the part I was having problems with but the "getting all users in all rooms". I just noticed another thread on this subject so will follow that.
From what I briefly read it look like I would udpate the database with a flag for each user in each room each time a user enters a room (onRoomJoin I think it is).
It would be nice if there was a smartfox class for _server.GetAllUsers - I'm not sure if other people would use this or not but it would be handy for any community that has a game and they need to keep the database updated to say which users are in the game (or how many).
From what I briefly read it look like I would udpate the database with a flag for each user in each room each time a user enters a room (onRoomJoin I think it is).
It would be nice if there was a smartfox class for _server.GetAllUsers - I'm not sure if other people would use this or not but it would be handy for any community that has a game and they need to keep the database updated to say which users are in the game (or how many).
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 42 guests