diff --git a/src/plugins/plugin_misc_radiocol.py b/src/plugins/plugin_misc_radiocol.py index c9f85c2e..5c7363c3 100755 --- a/src/plugins/plugin_misc_radiocol.py +++ b/src/plugins/plugin_misc_radiocol.py @@ -89,10 +89,10 @@ class Radiocol(): def userJoinedTrigger(self, room, user, profile): """This trigger is used to check if we are waiting people in this room, and to create a game if everybody is here""" - room_jid = room.occupantJID.userhostJID() - if self.radios.has_key(room_jid): + room_jid = room.occupantJID.userhost() + if self.radios.has_key(room_jid) and self.radios[room_jid]["referee"] == room.occupantJID.full(): #we are in a radiocol room, let's start the party ! - mess = self.createRadiocolElt(jid.JID(room_jid.userhost()+'/'+occupant)) + mess = self.createRadiocolElt(jid.JID(room_jid+'/'+user.nick)) mess.firstChildElement().addChild(self.__create_started_elt()) self.host.profiles[profile].xmlstream.send(mess) return True @@ -109,9 +109,9 @@ class Radiocol(): def radiocolRoomJoined(room): print "radiocolRoomJoined" _room_jid = room.occupantJID.userhostJID() + self.radiocolCreate(_room_jid.userhost(), profile_key=profile) for occupant in occupants: self.host.plugins["XEP-0249"].invite(jid.JID(occupant), room.occupantJID.userhostJID(), {"game":"Radiocol"}, profile) - self.radiocolCreate(_room_jid.userhost(), profile_key=profile) def after_init(ignore): room_name = "sat_radiocol_%s" % self.host.plugins["XEP-0045"].getUniqueName(profile_key)