plugins: radio collective first draft
This commit is contained in:
parent
d1f74ae9e4
commit
1d9e3b4fb2
1 changed files with 210 additions and 4 deletions
|
|
@ -60,7 +60,7 @@ class XEP_0045():
|
|||
self.clients={}
|
||||
host.bridge.addMethod("joinMUC", ".plugin", in_sign='ssa{ss}s', out_sign='', method=self._join)
|
||||
host.bridge.addMethod("getRoomsJoined", ".plugin", in_sign='s', out_sign='a(sass)', method=self.getRoomsJoined)
|
||||
host.bridge.addMethod("getRoomsSubjectss", ".plugin", in_sign='s', out_sign='a(ss)', method=self.getRoomsSubjectss)
|
||||
host.bridge.addMethod("getRoomsSubjects", ".plugin", in_sign='s', out_sign='a(ss)', method=self.getRoomsSubjects)
|
||||
host.bridge.addMethod("getUniqueRoomName", ".plugin", in_sign='s', out_sign='s', method=self.getUniqueName)
|
||||
host.bridge.addSignal("roomJoined", ".plugin", signature='sasss') #args: room_jid, room_nicks, user_nick, profile
|
||||
host.bridge.addSignal("roomUserJoined", ".plugin", signature='ssa{ss}s') #args: room_jid, user_nick, user_data, profile
|
||||
|
|
@ -101,6 +101,7 @@ class XEP_0045():
|
|||
mess = _("Error when joining the room")
|
||||
error (mess)
|
||||
self.host.bridge.newAlert(mess, _("Group chat error"), "ERROR", profile)
|
||||
raise failure
|
||||
|
||||
def getRoomsJoined(self, profile_key='@DEFAULT@'):
|
||||
"""Return room where user is"""
|
||||
|
|
@ -122,8 +123,7 @@ class XEP_0045():
|
|||
return ''
|
||||
return self.clients[profile].joined_rooms[room_jid].nick
|
||||
|
||||
|
||||
def getRoomsSubjectss(self, profile_key='@DEFAULT@'):
|
||||
def getRoomsSubjects(self, profile_key='@DEFAULT@'):
|
||||
"""Return received subjects of rooms"""
|
||||
profile = self.host.memory.getProfileName(profile_key)
|
||||
if not self.__check_profile(profile):
|
||||
|
|
|
|||
Loading…
Reference in a new issue