Use louiz for the default nick, fixed #1535
This commit is contained in:
parent
39b0075679
commit
cf88579ec7
4 changed files with 14 additions and 5 deletions
|
@ -14,7 +14,8 @@ port = 5222
|
|||
resource = poezio
|
||||
|
||||
# the nick you will use when joining a room with no associated nick
|
||||
default_nick = poezio
|
||||
# If this is empty, the $USER variable will be used
|
||||
default_nick =
|
||||
|
||||
# Jabber identifiant. Specify it only if you want to connect using an existing
|
||||
# account on a server. This is optional and useful only for some features,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -29,7 +29,7 @@ class User(object):
|
|||
self.last_talked = None
|
||||
self.update(affiliation, show, status, role)
|
||||
self.change_nick(nick)
|
||||
self.color = randrange(2, 10)
|
||||
self.color = randrange(2, 10) # assign a random color
|
||||
|
||||
def update(self, affiliation, show, status, role):
|
||||
self.affiliation = affiliation
|
||||
|
@ -48,7 +48,7 @@ class User(object):
|
|||
|
||||
def has_talked_since(self, t):
|
||||
"""
|
||||
get a int
|
||||
t: int
|
||||
Return True if the user talked since the last s seconds
|
||||
"""
|
||||
if self.last_talked is None:
|
||||
|
|
Loading…
Reference in a new issue