comparison plugins/plugin_xep_0045.py @ 73:9d113b5471e6

Dynamic signal addition in bridge - DBus: new addSignal method - plugins XEP-0045: roomJoined is now a dynamically added signal
author Goffi <goffi@goffi.org>
date Mon, 22 Mar 2010 14:21:57 +1100
parents f271fff3a713
children 6e3a06b4dd36
comparison
equal deleted inserted replaced
72:f271fff3a713 73:9d113b5471e6
67 def __init__(self, host): 67 def __init__(self, host):
68 info(_("Plugin XEP_0045 initialization")) 68 info(_("Plugin XEP_0045 initialization"))
69 self.host = host 69 self.host = host
70 self.clients={} 70 self.clients={}
71 host.bridge.addMethod("joinMUC", ".communication", in_sign='ssss', out_sign='', method=self.join) 71 host.bridge.addMethod("joinMUC", ".communication", in_sign='ssss', out_sign='', method=self.join)
72 host.bridge.addSignal("roomJoined", ".communication", signature='ssasss') #args: room_id, room_service, room_nicks, user_nick, profile
72 73
73 def __check_profile(self, profile): 74 def __check_profile(self, profile):
74 if not profile or not self.clients.has_key(profile) or not self.host.isConnected(profile): 75 if not profile or not self.clients.has_key(profile) or not self.host.isConnected(profile):
75 error (_('Unknown or disconnected profile')) 76 error (_('Unknown or disconnected profile'))
76 if self.clients.has_key(profile): 77 if self.clients.has_key(profile):