From cf88579ec74a90c6dfb1f456800119a757f936b7 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Wed, 30 Jun 2010 09:56:03 +0000 Subject: Use louiz for the default nick, fixed #1535 --- src/multiuserchat.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/multiuserchat.py') 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 -- cgit v1.2.3