Skip to content
Greg edited this page Aug 22, 2013 · 6 revisions

room.addMember(user)

Add a user to this room. If they are already in a room, they are removed from it.

room.removeMember(user)

Remove a user from this room. They are added to the lobby if the server is configured to autoJoinLobby (default true). If the user is not in this room, nothing happens and no error occurs.

room.data

An object for you to store custom data for each room. Initially it is {} and no data is added automatically by cloak.

room.age()

Age of this room in milliseconds

room.messageMembers(name, arg)

The same as doing user.message(name, arg) for each user in the room.

Clone this wiki locally