summaryrefslogtreecommitdiff
path: root/src/gui.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-30 09:56:03 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-30 09:56:03 +0000
commitcf88579ec74a90c6dfb1f456800119a757f936b7 (patch)
treee6c9ba71f3092c3d1dc59d2db361ebb1179ddc91 /src/gui.py
parent39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf (diff)
downloadpoezio-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/gui.py')
-rw-r--r--src/gui.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui.py b/src/gui.py
index e51f9828..cb1e7fc2 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -24,6 +24,7 @@ from os.path import isfile
from time import sleep
import sys
+import os
import curses
from datetime import datetime
@@ -584,7 +585,10 @@ class Gui(object):
else:
info = args[0].split('/')
if len(info) == 1:
- 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
else:
nick = info[1]
if info[0] == '': # happens with /join /nickname, which is OK