diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-06-30 09:56:03 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-06-30 09:56:03 +0000 |
commit | cf88579ec74a90c6dfb1f456800119a757f936b7 (patch) | |
tree | e6c9ba71f3092c3d1dc59d2db361ebb1179ddc91 /src/multiuserchat.py | |
parent | 39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf (diff) | |
download | poezio-cf88579ec74a90c6dfb1f456800119a757f936b7.tar.gz poezio-cf88579ec74a90c6dfb1f456800119a757f936b7.tar.bz2 poezio-cf88579ec74a90c6dfb1f456800119a757f936b7.tar.xz poezio-cf88579ec74a90c6dfb1f456800119a757f936b7.zip |
Use louiz for the default nick, fixed #1535
Diffstat (limited to 'src/multiuserchat.py')
-rw-r--r-- | src/multiuserchat.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/multiuserchat.py b/src/multiuserchat.py index cd004709..0ac52725 100644 --- a/src/multiuserchat.py +++ b/src/multiuserchat.py @@ -22,6 +22,7 @@ from xmpp.protocol import Presence, Iq, Message, JID import xmpp import common import threading +import os from time import (altzone, gmtime, localtime, strftime, timezone) @@ -135,7 +136,10 @@ class MultiUserChat(object): if len(args) == 2: nick = args[1] else: - nick = config.get('default_nick', 'poezio') + default = os.environ.get('USER') if os.environ.get('USER') else 'poezio' + nick = config.get('default_nick', '') + if nick == '': + nick = default self.handler.emit('join-room', room=roomname, nick=nick) if config.get('jid', '') == '': # Don't send the vcard if we're not anonymous self.vcard_sender.start() # because the user ALREADY has one on the server |