onRoomListUpdate()

Availability:

SmartFoxServer Lite / Basic / Pro

Usage:

smartFox.onRoomListUpdate(roomList <propList>)

Description:

The event is fired when entering a zone (usually during a login() call). The server sends a list of rooms in the zone.

NOTE:
If you are using the default login mechanism provided by SmartFoxServer you will receive this event right after a successfull login.
This is because the client API, internally, call the getRoomList() method after the login response has arrived.

If you're implementing your own custom login handler you will have to manually request the list of rooms from the client side, by calling getRoomList()

Parameters:

roomList   A list of propertylists describing the rooms

Check the Room Properties for more info on the propertylists returned.

Returns:

nothing

Example:

on onRoomListUpdate me, roomList
	-- Dump the names of the rooms available
	repeat with i=1 to roomlist.count
		put(roomList[i].name)
	end repeat
end

See also: