login to multiple rooms

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
eventdave
Posts: 18
Joined: 02 Jul 2010, 14:12

login to multiple rooms

Post by eventdave »

I have a zone with 6 rooms in it. I have a control program that needs to send messages to all rooms at the same time. How is this done?

I don't know which room to connect to. Or can I connect as an administrator? Or do I connect to all six rooms and send 6 meesages each time I need to send to ALL users in the zone?

Thanks for any help.

Dave
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

This can be achieved simply by using this method, zone.getUserList(), which will fetch a list of all users within the zone.
Smartfox's forum is my daily newspaper.
eventdave
Posts: 18
Joined: 02 Jul 2010, 14:12

Post by eventdave »

Thanks for your reply, that is very helpful.

My next question is, how do I get notifications when a user enters a different room to the one I am connected to ?

Thanks

Dave
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

You can see the full list of internal events via http://www.smartfoxserver.com/docs/docP ... /index.htm. For your case, it will be 'userJoin'. Also 'userExit' will be triggered on room leave.
Smartfox's forum is my daily newspaper.
Post Reply