summaryrefslogtreecommitdiff
path: root/src/multiuserchat.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/multiuserchat.py')
-rw-r--r--src/multiuserchat.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/multiuserchat.py b/src/multiuserchat.py
index c8a1aafc..a54874a7 100644
--- a/src/multiuserchat.py
+++ b/src/multiuserchat.py
@@ -152,10 +152,12 @@ class MultiUserChat(object):
"""Join a new room"""
pres = Presence(to='%s/%s' % (room, nick))
pres.setFrom('%s'%self.own_jid)
- if password:
+ if not password:
pres.addChild(name='x', namespace=NS_MUC)
else:
- pres.addChild(name='x', namespace=NS_MUC)
+ item = pres.addChild(name='x', namespace=NS_MUC)
+ passwd = item.addChild(name='password')
+ passwd.setData(password)
self.connection.send(pres)
def quit_room(self, room, nick, msg=None):