Allow configuration of the character appended in case of a nick

conflict.
This commit is contained in:
Alex Mauer 2005-11-18 17:47:52 +00:00
parent cee4222c1a
commit 0072034452
2 changed files with 3 additions and 1 deletions

View File

@ -92,6 +92,7 @@ class Config:
'gc-height': [opt_int, 400],
'gc-hpaned-position': [opt_int, 540],
'gc_refer_to_nick_char': [opt_str, ','],
'gc_proposed_nick_char': [opt_str, '_'],
'chat-x-position': [opt_int, 0],
'chat-y-position': [opt_int, 0],
'chat-width': [opt_int, 480],

View File

@ -456,7 +456,8 @@ class Connection:
elif errcode == '409': # nick conflict
# the jid_from in this case is FAKE JID: room_jid/nick
# resource holds the bad nick so propose a new one
proposed_nickname = resource + '_'
proposed_nickname = resource + \
gajim.config.get('gc_proposed_nick_char')
room_jid = gajim.get_room_from_fjid(who)
self.dispatch('ASK_NEW_NICK', (room_jid, _('Unable to join room'),
_('Your desired nickname is in use or registered by another occupant.\nPlease specify another nickname below:'), proposed_nickname))