Hi,
I am creating room using extension using the below code:
var roomObj = {}
roomObj.name = roomname
roomObj.maxU = 20
roomObj.isGame = "true"
var roomVars = [{name:"wel", val:'welcome to room', priv:false, persistent:true}];
var resRom = _server.createRoom(roomObj, null, true, true,roomVars)
However the room is not getting auto-deleted when there is not user inside the room.
Is there a way to auto delete a room created by an extension where there is no user in that room.
Thanks A ton in advance!
Suvro
Auto-Destroy Rooms created by sfsExtensons
If you set the room ownership (2nd parameter in createRoom method) to null (server-owned), it won't get destroyed automatically where there is no users in the room. If you set the ownership to a user, it will get removed automatically when all users left.
You can however remove server-owned rooms, just that you'll have to create a script in your extension to do so.
You can however remove server-owned rooms, just that you'll have to create a script in your extension to do so.
Smartfox's forum is my daily newspaper.
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 24 guests