summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-11-19 03:44:43 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-11-19 03:44:43 +0000
commit61cc03b3d25f25b31dfed35da4c61a7bc0cde485 (patch)
treee7227d361534d6acfaa0e03bbbe2032f14cdc669 /src
parenteb2663c2dbd168daa536b836d55c9041db7a3d68 (diff)
downloadpoezio-61cc03b3d25f25b31dfed35da4c61a7bc0cde485.tar.gz
poezio-61cc03b3d25f25b31dfed35da4c61a7bc0cde485.tar.bz2
poezio-61cc03b3d25f25b31dfed35da4c61a7bc0cde485.tar.xz
poezio-61cc03b3d25f25b31dfed35da4c61a7bc0cde485.zip
better use sleekxmpp in muc.py
Diffstat (limited to 'src')
-rw-r--r--src/multiuserchat.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/multiuserchat.py b/src/multiuserchat.py
index 0fc5cb3c..3a40284c 100644
--- a/src/multiuserchat.py
+++ b/src/multiuserchat.py
@@ -26,26 +26,19 @@ def send_private_message(xmpp, jid, line):
"""
Send a private message
"""
- msg = xmpp.makeMessage(jid)
- msg['to'] = jid
- msg['type'] = 'chat'
- msg['body'] = line
- msg.send()
+ xmpp.send_message(mto=jid, mbody=line, mtype='chat')
def send_groupchat_message(xmpp, jid, line):
"""
Send a message to the groupchat
"""
- msg = xmpp.makeMessage(jid)
- msg['type'] = 'groupchat'
- msg['body'] = line
- msg.send()
+ xmpp.send_message(mto=jid, mbody=line, mtype='groupchat')
def change_show(xmpp, jid, own_nick, show, status):
"""
Change our 'Show'
"""
- pres = xmpp.makePresence(pto='%s/%s' % (jid, own_nick))
+ pres = xmpp.make_presence(pto='%s/%s' % (jid, own_nick))
if show: # if show is None, don't put a <show /> tag. It means "available"
pres['type'] = show
if status:
@@ -56,7 +49,7 @@ def change_subject(xmpp, jid, subject):
"""
Change the room subject
"""
- msg = xmpp.makeMessage(jid)
+ msg = xmpp.make_message(jid)
msg['type'] = 'groupchat'
msg['subject'] = subject
msg.send()
@@ -65,7 +58,7 @@ def change_nick(xmpp, jid, nick):
"""
Change our own nick in a room
"""
- xmpp.makePresence(pto='%s/%s' % (jid, nick)).send()
+ xmpp.make_presence(pto='%s/%s' % (jid, nick)).send()
def join_groupchat(xmpp, jid, nick, passwd=''):
"""