Tarot game: basic trick
- plugin xep-0045: new method getRoomNick - plugin tarot: basic trick - wix: played card are shown in CardPanel
This commit is contained in:
parent
71352c7b80
commit
2e6c6142d5
1 changed files with 97 additions and 6 deletions
|
|
@ -110,6 +110,17 @@ class XEP_0045():
|
|||
result.append((room.roomIdentifier, room.service, [user.nick for user in room.roster.values()], room.nick))
|
||||
return result
|
||||
|
||||
def getRoomNick(self, room_jid, profile_key='@DEFAULT@'):
|
||||
"""return nick used in room by user
|
||||
@param room_jid: unicode room id
|
||||
@profile_key: profile
|
||||
@return: nick or empty string in case of error"""
|
||||
profile = self.host.memory.getProfileName(profile_key)
|
||||
if not self.__check_profile(profile) or not self.clients[profile].joined_rooms.has_key(room_jid):
|
||||
return ''
|
||||
return self.clients[profile].joined_rooms[room_jid].nick
|
||||
|
||||
|
||||
def getRoomSubjects(self, profile_key='@DEFAULT@'):
|
||||
"""Return received subjects of rooms"""
|
||||
profile = self.host.memory.getProfileName(profile_key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue