Topic History of: rooms and owner leaves. Max. showing the last posts - (Last post first)
Author
Message
admin
Hi
There is no such thing on the server side (but it could be easily implemented in a few lines with plugins now version palabre-0.6)
But when you see that this user leaves
Node = <client name="OWNEROFROOM" left="XYZ" />
you could just make every client connected to this room send a
<leave room="XYZ" />
or in a Palabre plugin :
Code:
class closeRoomWhenCreatorLeaves:
def __init__(self,server):
self.name = "closeRoomWhenCreatorLeaves"
self.server = server
self.server.registerAction('onRoomLeaveClient',self.name)
def onRoomLeaveClient(self,room, nickname):
if room.isClientOperator(nickname):
room.roomSendToAllClients('Room is closing NOW !',nickname,False)
room.removeRoom()
That's it !
Jose
Hi
Sorry by my bad English, i'm Venezuelan
Thanks for the PALABRE, works fine.
I'm developing a poker game, that the user can create rooms, and other users can join this rooms. I have the situation that the user "A" create a room "ROOM_A" and after that close the program. Everyone see that user leaves, but the "ROOM_A" is still present.
In my script, the user "A" is who control everything is happen in this room, and i need when the user leaves, this room disappear (and everything is in, is kick out).
I use the function Pal_On_clients(node), the PalSend("<getrooms />"); for the update the rooms, but i see there is too much information only for one room of one user. there is another way??