summaryrefslogtreecommitdiff
path: root/src/multiuserchat.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/multiuserchat.py')
-rw-r--r--src/multiuserchat.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/multiuserchat.py b/src/multiuserchat.py
index 7aefae28..386da341 100644
--- a/src/multiuserchat.py
+++ b/src/multiuserchat.py
@@ -55,11 +55,14 @@ def change_subject(xmpp, jid, subject):
msg['subject'] = subject
msg.send()
-def change_nick(xmpp, jid, nick, status=None, show=None):
+def change_nick(core, jid, nick, status=None, show=None):
"""
Change our own nick in a room
"""
- xmpp.make_presence(pshow=show, pstatus=status, pto=safeJID('%s/%s' % (jid, nick))).send()
+ xmpp = core.xmpp
+ presence = xmpp.make_presence(pshow=show, pstatus=status, pto=safeJID('%s/%s' % (jid, nick)))
+ core.events.trigger('changing_nick', presence)
+ presence.send()
def join_groupchat(core, jid, nick, passwd='', maxhistory=None, status=None, show=None, seconds=0):
xmpp = core.xmpp