summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0045.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2009-09-01 17:24:52 +0000
committerNathan Fritz <fritzy@netflint.net>2009-09-01 17:24:52 +0000
commitb9f7af885c10edcea74ddadbe0dce5368a00a679 (patch)
treeaa60e778c84798cd31a99766f0c21ad496509aa9 /sleekxmpp/plugins/xep_0045.py
parent32ef496502bb338ee030b31ce7ba70e789995d9c (diff)
downloadslixmpp-b9f7af885c10edcea74ddadbe0dce5368a00a679.tar.gz
slixmpp-b9f7af885c10edcea74ddadbe0dce5368a00a679.tar.bz2
slixmpp-b9f7af885c10edcea74ddadbe0dce5368a00a679.tar.xz
slixmpp-b9f7af885c10edcea74ddadbe0dce5368a00a679.zip
* fixed some python3 transition bugs
* added status options to muc joining
Diffstat (limited to 'sleekxmpp/plugins/xep_0045.py')
-rw-r--r--sleekxmpp/plugins/xep_0045.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sleekxmpp/plugins/xep_0045.py b/sleekxmpp/plugins/xep_0045.py
index b0523755..54b86019 100644
--- a/sleekxmpp/plugins/xep_0045.py
+++ b/sleekxmpp/plugins/xep_0045.py
@@ -87,10 +87,10 @@ class xep_0045(base.base_plugin):
mtype = xml.attrib.get('type', 'normal')
self.xmpp.event("groupchat_message", {'room': mfrom, 'name': resource, 'type': mtype, 'subject': subject, 'message': message})
- def joinMUC(self, room, nick, maxhistory="0", password='', wait=False):
+ def joinMUC(self, room, nick, maxhistory="0", password='', wait=False, pstatus=None, pshow=None):
""" Join the specified room, requesting 'maxhistory' lines of history.
"""
- stanza = self.xmpp.makePresence(pto="%s/%s" % (room, nick))
+ stanza = self.xmpp.makePresence(pto="%s/%s" % (room, nick), pstatus=pstatus, pshow=pshow)
x = ET.Element('{http://jabber.org/protocol/muc}x')
if password:
passelement = ET.Element('password')
@@ -180,7 +180,7 @@ class xep_0045(base.base_plugin):
""" Get the property of a nick in a room, such as its 'jid' or 'affiliation'
If not found, return None.
"""
- if self.rooms.has_key(room) and self.rooms[room].has_key(nick) and self.rooms[room][nick].has_key(jidProperty):
+ if room in self.rooms and nick in self.rooms[room] and jidProperty in self.rooms[room][nick]:
return self.rooms[room][nick][jidProperty]
else:
return None