Page 1 of 1

getAllUsersInZone

Posted: 22 Aug 2006, 13:33
by radz
Hi, I have a little problem with broadcasting an event to all users in a zone.

I have one main room with an extension handling events. There are also game rooms using an other extension.

When a user enters a game room and leaves the main room, currZone.getAllUsersInZone() in the main extension does not include users in the game rooms (even though they are in the same zone). Is it possible to get a list of all users regardless of which extension is being used? Am I missing something?

Posted: 26 Aug 2006, 08:39
by Virusescu
Hello radz.
The zone class does not provide such a method like getAllUsersInZone(); - Or does it? Maybe I need to update :roll:
You will have to do it manually.

Read this topic for more info and code how to do it
http://forums.smartfoxserver.com/viewto ... etallusers

Posted: 31 Aug 2006, 08:26
by radz
getAllUsersInZone() is documented in the java docs anyway. I tried getChannelList() instead and it worked fine. Thanks for your reply.

Posted: 31 Aug 2006, 15:15
by Lapo
Yep, that's an alternative.
You're right the getAllUsersInZone actually filters users inside game rooms. At the moment, without the source under my eyes, I can't remember why it was implemented this way.

I will check it and see. It's probably needed a method that returns the full list of users without exceptions