comparison src/plugins/plugin_xep_0045.py @ 599:8d8a2ad163e2

plugin XEP-0045: fixed isNickInRoom
author Goffi <goffi@goffi.org>
date Wed, 20 Feb 2013 20:36:09 +0100
parents 98a962d0b23c
children 84a6e83157c2
comparison
equal deleted inserted replaced
598:af900f49df89 599:8d8a2ad163e2
138 profile = self.host.memory.getProfileName(profile) 138 profile = self.host.memory.getProfileName(profile)
139 if not self.__check_profile(profile): 139 if not self.__check_profile(profile):
140 raise exceptions.UnknownProfileError("Unknown or disconnected profile") 140 raise exceptions.UnknownProfileError("Unknown or disconnected profile")
141 if room_jid.userhost() not in self.clients[profile].joined_rooms: 141 if room_jid.userhost() not in self.clients[profile].joined_rooms:
142 raise UnknownRoom("This room has not been joined") 142 raise UnknownRoom("This room has not been joined")
143 return self.clients[profile].joined_rooms[room_jid.userhost()].inRoster(nick) 143 return self.clients[profile].joined_rooms[room_jid.userhost()].inRoster(muc.User(nick))
144 144
145 def getRoomsSubjects(self, profile_key='@DEFAULT@'): 145 def getRoomsSubjects(self, profile_key='@DEFAULT@'):
146 """Return received subjects of rooms""" 146 """Return received subjects of rooms"""
147 profile = self.host.memory.getProfileName(profile_key) 147 profile = self.host.memory.getProfileName(profile_key)
148 if not self.__check_profile(profile): 148 if not self.__check_profile(profile):