Private Rooms

Everything about the SmartFoxBits UI Components for SmartFoxServer 1.x. Post your questions, suggestions and bug reports.

Moderators: Lapo, Bax

Post Reply
rkrass
Posts: 7
Joined: 05 Sep 2007, 21:45

Private Rooms

Post by rkrass »

Ive been using smartfox for a couple months now for my avatar chat program. Ive come to a problem and i'm not sure how to navigate around it.

I would like users to have the ability to create private rooms (dynamically) but i do not want all these rooms to show up on the global list. Possibly create a 'secondary room list' where these private rooms would show up and be organized alphabetically.?

Any thoughts?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

The simplest idea that comes to my mind is to use a special character in the room name that identifies these "special" rooms, e.g. the "$" symbol

Each time you load the room list or receive a notification about a new room, you can check this token and decide what to do. Additionally you can remove the special token when showing the room name, so that the "tricks" is transparent to the user.

A "cleaner" alternative is using Room Variables. There's a flag in the <Zone> definition that allows you to receive the room variables in the user list.
Lapo
--
gotoAndPlay()
...addicted to flash games
rkrass
Posts: 7
Joined: 05 Sep 2007, 21:45

Post by rkrass »

im currently using smartfoxbits for the room list. could i do this with the room list component?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Private Rooms

Post by Bax »

rkrass wrote:I would like users to have the ability to create private rooms (dynamically) but i do not want all these rooms to show up on the global list. Possibly create a 'secondary room list' where these private rooms would show up and be organized alphabetically.?
The SmartFoxBits RoomList component has a number of show... properties (check the API): showPrivateRooms, showLimboRooms, showGameRooms, showChatRooms.
You can use these properties to "tweak" the main list (do not show private rooms) and the secondary list (show private rooms only).
Hope this helps.
Paolo Bax
The SmartFoxServer Team
Post Reply