Plugin : Rooms
Author:Rex.Rainbow
Download
Properties
Domain
- The root location of the Firebase data.
Sub domain
- Sub domain for this function.
Door control
- Set "Auto" to close or open door when room is full or not.
- Options : ["Manual","Auto"]
Actions
0. My info
Action:Set my info
- Set user info.
- UserID ( string ) : UserID from authentication.
- Name ( string ) : User name.
Door state
Action:Open
- Open or close current room.
- Door state ( Combo ) : Door state of this room.
- Options : ["Close","Open"]
Permission list
Action:Add
- Add user to permission list.
- UserID ( string ) : UserID from authentication.
- Name ( string ) : Player name.
- List ( Combo ) : List type.
- Options : ["white - list","black - lisk"]
Action:Remove
- Remove user from permission list.
- UserID ( string ) : UserID from authentication.
- List ( Combo ) : List type.
- Options : ["white - list","black - lisk"]
Room
Action:Create
- Create then join this room.
- Name ( string ) : Room name.
- Type ( string ) : Room type. "public", "private", or others.
- Max peers ( number ) : The maximum number of peers that can join this room. Leave 0 for unlimited.
- Life period ( Combo ) : Life period of this room.
- Options : ["Temporary","Persisted"]
- Door state ( Combo ) : Door state of this room.
- Options : ["Closed","Open"]
- Room ID ( string ) : Room ID. Leave "" to use timestamp form server.
- Create action ( Combo ) : Create action.
- Options : ["Create","Leave current room, then create or join"]
Action:Create (#)
- Create then join this room.
- Name ( string ) : Room name.
- Type ( string ) : Room type. "public", "private", or others.
- Max peers ( number ) : The maximum number of peers that can join this room. Leave 0 for unlimited.
- Life period ( number ) : 0=Temporary, 1=Persisted.
- Door state ( number ) : 0=Closed, 1=Open.
- oin permission ( number ) : 0=Anyone, 1=Black list, 2=White list.
- Room ID ( string ) : Room ID. Leave "" to use timestamp form server.
- Create action ( Combo ) : Create action.
- Options : ["Create","Create then join"]
Action:Join
- Join room.
- Room ID ( string ) : Room ID.
- Join action ( Combo ) : Join action.
- Options : ["Join","Leave current room then join"]
Action:Leave
Action:Kick user
- Kick user.
- UserID ( string ) : UserID from authentication.
Action:Join random
- Join random room from current rooms list.
- Join action ( Combo ) : Join action.
- Options : ["Join","Leave current room then join"]
- Retry ( number ) : Retry count to get default value.
Room - metadata
Action:Get metadata
- Get metadata included white list and black list.
Room list
Action:Update
- Update opened rooms list.
- Type ( string ) : Room type. "public", "private", or others. Leave "" to get all "open" rooms for all types.
Action:Stop updating
- Stop updating opened rooms list.
User list
Action:Get users list of room
- Get users list of room.
- Room ID ( string ) : Room ID.
Expressions
Custom channel
Expression:ChannelRef
- Get custom channel absolute reference. Add 2nd parameter for roomID.
For each - index
Expression:LoopIndex
- Get loop index in for each loop.
My
Expression:MyUserName
Expression:MyUserID
Permission list
Expression:WhiteListToJSON
- Get white list in JSON string.
Expression:BlackListToJSON
- Get black list in JSON string.
Room
Expression:RoomName
Expression:RoomID
Rooms list
Expression:CurCreatorName
- Get the current creater name in a For Each loop.
Expression:CurCreatorID
- Get the current creater ID in a For Each loop.
Expression:RoomsCount
- Get amount of opened rooms.
Rooms list - for each
Expression:CurRoomName
- Get the current room name in a For Each loop.
Expression:CurRoomID
- Get the current room ID in a For Each loop.
Expression:CurRoomMaxPeers
- Get max peers of current room in a For Each loop.
Rooms list - index
Expression:Index2RoomName
- Get room name by room index.
- Index ( number ) : Room index.
Expression:Index2RoomID
- Get room ID by room index.
- Index ( number ) : Room index.
Expression:Index2RoomMaxPeers
- Get room name by room index.
- Index ( number ) : Room index.
Triggered
Expression:TriggeredRoomName
Expression:TriggeredRoomID
Users list
Expression:TriggeredUserName
Expression:TriggeredUserID
Expression:UsersCount
- Get amount of users in users list.
Users list - for each
Expression:CurUserName
- Get the current user name in a For Each loop.
Expression:CurUserID
- Get the current user ID in a For Each loop.
Users list - index
Expression:Index2UserName
- Get user name by user index.
- Index ( number ) : User index.
Expression:Index2UserID
- Get user ID by user index.
- Index ( number ) : User index.
Conditions
Action
Condition:Locked
- Return true if plugin is locked which could not run any action.
Create room
Condition:On create
- Triggered when room created.
Condition:On create error
- Triggered when room created error.
Door state
Condition:On opened
- Triggered when room is opened.
Condition:On closed
- Triggered when room is closed.
Join room
Condition:On join
- Triggered when join room.
Condition:On join error
- Triggered when join room error.
Leave room
Condition:On left
- Triggered when left room or room removed
Condition:On kicked
- Triggered when user kicked out or room removed.
Permission list
Condition:For each user
- Repeat the event for each user in permission list.
- List ( Combo ) : List type.
- Options : ["white - list","black - lisk"]
Room
Condition:In room
- Return true if current user is in a room.
Rooms list
Condition:On update
- Triggered when rooms list updated.
Condition:For each room
- Repeat the event for each room in rooms list.
Condition:For each room in a range
- Repeat the event for each room in a range.
- Start ( number ) : Start from index (0-based).
- End ( number ) : End to index (0-based). This value should larger than Start.
Users list
Condition:On update
- Triggered when user list updated.
Condition:For each user
- Repeat the event for each user in users list.
Condition:For each user in a range
- Repeat the event for each user in a range.
- Start ( number ) : Start from index (0-based).
- End ( number ) : End to index (0-based). This value should larger than Start.
Condition:On user joined
- Triggered when user joined.
Condition:On user left
- Triggered when user left.
Condition:I am first user
- Return true if client is the first user of current room.
Condition:Is full
- Return true if room is full of users.
Condition:On become first user
- Triggered when became first user of current room.
Condition:On get users list
- Triggered when get users list.