diff options
author | mathieui <mathieui@mathieui.net> | 2014-04-17 00:02:19 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-04-17 00:02:19 +0200 |
commit | 71ae73ca7b37123d741eb065dc26d85d12922c43 (patch) | |
tree | 7af26c9f10485d3a65faf0f02ffc6e8fe68df587 /src/multiuserchat.py | |
parent | 214904f19900996b47d9c42bb7240853ef88fe89 (diff) | |
download | poezio-71ae73ca7b37123d741eb065dc26d85d12922c43.tar.gz poezio-71ae73ca7b37123d741eb065dc26d85d12922c43.tar.bz2 poezio-71ae73ca7b37123d741eb065dc26d85d12922c43.tar.xz poezio-71ae73ca7b37123d741eb065dc26d85d12922c43.zip |
Log part messages and show a leave message on /cycle
Diffstat (limited to 'src/multiuserchat.py')
-rw-r--r-- | src/multiuserchat.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/multiuserchat.py b/src/multiuserchat.py index 93fde819..d1921100 100644 --- a/src/multiuserchat.py +++ b/src/multiuserchat.py @@ -64,7 +64,7 @@ def change_nick(core, jid, nick, status=None, show=None): core.events.trigger('changing_nick', presence) presence.send() -def join_groupchat(core, jid, nick, passwd='', maxhistory=None, status=None, show=None, seconds=0): +def join_groupchat(core, jid, nick, passwd='', maxhistory=None, status=None, show=None, seconds=None): xmpp = core.xmpp stanza = xmpp.makePresence(pto='%s/%s' % (jid, nick), pstatus=status, pshow=show) x = ET.Element('{http://jabber.org/protocol/muc}x') @@ -72,7 +72,7 @@ def join_groupchat(core, jid, nick, passwd='', maxhistory=None, status=None, sho passelement = ET.Element('password') passelement.text = passwd x.append(passelement) - if seconds: + if seconds is not None: history = ET.Element('{http://jabber.org/protocol/muc}history') history.attrib['seconds'] = str(seconds) x.append(history) |