comparison src/plugins/plugin_misc_radiocol.py @ 453:5731b038fc7f

plugin radiocol: removed occupants list in radiocolStarted signal
author Goffi <goffi@goffi.org>
date Sun, 22 Jan 2012 19:41:02 +0100
parents afe9cfd2ddbb
children 72522263cbc9
comparison
equal deleted inserted replaced
452:fd455b3ca6d4 453:5731b038fc7f
63 info(_("Radio collective initialization")) 63 info(_("Radio collective initialization"))
64 self.host = host 64 self.host = host
65 self.radios={} 65 self.radios={}
66 host.bridge.addMethod("radiocolLaunch", ".plugin", in_sign='ass', out_sign='', method=self.radiocolLaunch) #args: occupants, profile 66 host.bridge.addMethod("radiocolLaunch", ".plugin", in_sign='ass', out_sign='', method=self.radiocolLaunch) #args: occupants, profile
67 host.bridge.addMethod("radiocolCreate", ".plugin", in_sign='ss', out_sign='', method=self.radiocolCreate) #args: room_jid, profile 67 host.bridge.addMethod("radiocolCreate", ".plugin", in_sign='ss', out_sign='', method=self.radiocolCreate) #args: room_jid, profile
68 host.bridge.addSignal("radiocolStarted", ".plugin", signature='ssass') #args: room_jid, referee, occupants, profile 68 host.bridge.addSignal("radiocolStarted", ".plugin", signature='sss') #args: room_jid, referee, profile
69 host.trigger.add("MUC user joined", self.userJoinedTrigger) 69 host.trigger.add("MUC user joined", self.userJoinedTrigger)
70 70
71 def createRadiocolElt(self, to_jid, type="normal"): 71 def createRadiocolElt(self, to_jid, type="normal"):
72 type = "normal" if to_jid.resource else "groupchat" 72 type = "normal" if to_jid.resource else "groupchat"
73 elt = domish.Element(('jabber:client','message')) 73 elt = domish.Element(('jabber:client','message'))
167 occupants_data = radio_data['occupants_data'] 167 occupants_data = radio_data['occupants_data']
168 168
169 for elt in radio_elt.elements(): 169 for elt in radio_elt.elements():
170 170
171 if elt.name == 'started': #new game created 171 if elt.name == 'started': #new game created
172 self.host.bridge.radiocolStarted(room_jid.userhost(), from_jid.full(), [], profile) #FIXME: add occupants list here ? 172 self.host.bridge.radiocolStarted(room_jid.userhost(), from_jid.full(), profile)
173 else: 173 else:
174 error (_('Unmanaged game element: %s') % elt.name) 174 error (_('Unmanaged game element: %s') % elt.name)
175 175
176 def getHandler(self, profile): 176 def getHandler(self, profile):
177 return RadiocolHandler(self) 177 return RadiocolHandler(self)