comparison libervia.py @ 146:d15fbb208ba0

browser side: fixed MUC signals management
author Goffi <goffi@goffi.org>
date Sun, 09 Dec 2012 23:37:20 +0100
parents a5e9aa1f9c0c
children 8635bc9db9bf
comparison
equal deleted inserted replaced
145:c0035e5e2d08 146:d15fbb208ba0
374 else: 374 else:
375 self.addTab(chat_panel, _target.node) 375 self.addTab(chat_panel, _target.node)
376 chat_panel.setPresents(room_nicks) 376 chat_panel.setPresents(room_nicks)
377 chat_panel.historyPrint() 377 chat_panel.historyPrint()
378 378
379 def _roomUserJoinedCb(self, room_jid, user_nick, user_data): 379 def _roomUserJoinedCb(self, room_jid_s, user_nick, user_data):
380 for lib_wid in self.libervia_widgets: 380 for lib_wid in self.libervia_widgets:
381 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid.bare: 381 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid_s:
382 lib_wid.userJoined(user_nick, user_data) 382 lib_wid.userJoined(user_nick, user_data)
383 383
384 def _roomUserLeftCb(self, room_jid, user_nick, user_data): 384 def _roomUserLeftCb(self, room_jid_s, user_nick, user_data):
385 for lib_wid in self.libervia_widgets: 385 for lib_wid in self.libervia_widgets:
386 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid.bare: 386 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid_s:
387 lib_wid.userLeft(user_nick, user_data) 387 lib_wid.userLeft(user_nick, user_data)
388 388
389 def _tarotGameStartedCb(self, room_jid, referee, players): 389 def _tarotGameStartedCb(self, room_jid_s, referee, players):
390 print ("Tarot Game Started \o/") 390 print ("Tarot Game Started \o/")
391 for lib_wid in self.libervia_widgets: 391 for lib_wid in self.libervia_widgets:
392 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid: 392 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid_s:
393 lib_wid.startGame("Tarot", referee, players) 393 lib_wid.startGame("Tarot", referee, players)
394 394
395 def _tarotGameGenericCb(self, event_name, room_jid, args): 395 def _tarotGameGenericCb(self, event_name, room_jid_s, args):
396 for lib_wid in self.libervia_widgets: 396 for lib_wid in self.libervia_widgets:
397 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid: 397 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid_s:
398 getattr(lib_wid.getGame("Tarot"), event_name)(*args) 398 getattr(lib_wid.getGame("Tarot"), event_name)(*args)
399 399
400 def _radioColStartedCb(self, room_jid, referee): 400 def _radioColStartedCb(self, room_jid_s, referee):
401 for lib_wid in self.libervia_widgets: 401 for lib_wid in self.libervia_widgets:
402 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid: 402 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid_s:
403 lib_wid.startGame("RadioCol", referee) 403 lib_wid.startGame("RadioCol", referee)
404 404
405 def _radioColGenericCb(self, event_name, room_jid, args): 405 def _radioColGenericCb(self, event_name, room_jid_s, args):
406 for lib_wid in self.libervia_widgets: 406 for lib_wid in self.libervia_widgets:
407 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid: 407 if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid_s:
408 getattr(lib_wid.getGame("RadioCol"), event_name)(*args) 408 getattr(lib_wid.getGame("RadioCol"), event_name)(*args)
409 409
410 410
411 def _getPresenceStatusCb(self, presence_data): 411 def _getPresenceStatusCb(self, presence_data):
412 for entity in presence_data: 412 for entity in presence_data: