Bug 147473

Summary: No nicknames from the identity were accepted by the connection
Product: [Applications] konversation Reporter: Lars DIECKOW <lars.dieckow>
Component: generalAssignee: argonel <argonel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.0.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: patch

Description Lars DIECKOW 2007-07-03 02:27:01 UTC
Version:           1.0.1 (using KDE 3.5.7 "release 10.1" , openSUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.18.2-34-default

This is related to bug 131399 and possibly bug 85528.

How to reproduce:
For one identity, I have two nicks set up, foo and foo_. I connect to
the server using foo, then during the session change manually to foo_.
Later desaster strikes (for instance, the ISP's daily disconnect) and
I lose the connection to the server.

What should happen:
Konversation wraps around the list of defined nicks and picks the
first one again, foo. With this nick, it reconnects to the server.

What really happens:
Konversation thinks it is all out of nicks. It pops up the dialog
'No nicknames from the "%1" identity were accepted by the
connection "%2".'. Meanwhile there's no reconnect at all.

I enter foo as nick and confirm the dialog and the program reconnects
successfully. This proves that foo is really not in use, Konversation
just thinks it is.
Comment 1 argonel 2008-04-17 07:20:05 UTC
i think i've seen this as well, investigating
Comment 2 argonel 2008-04-18 03:56:43 UTC
Created attachment 24381 [details]
patch
Comment 3 argonel 2008-04-18 03:58:31 UTC
(sorry for the spam, did i mention the webform is stupid?)

So above is the fix for this, over-engineered: just the way I like it. This ensures we try each nickname we have at least once per reconnect. The old method assumed that the current nickname is #0, but sometimes the current nickname is one that was typed into Channel::nicknameCombobox or set with /nick. Since Channel::nicknameCombobox is a can of worms, I elected to leave it out of the equation.

I'd commit this right now except I know Eike has a big revamp of server.cpp on its way, so I defer the timing of this commit to him.
Comment 4 argonel 2008-04-20 18:33:10 UTC
SVN commit 799159 by argonel:

Now try all nicknames in the identity once and only once per reconnect attempt.
BUG: 147473


 M  +1 -1      chatwindow.cpp  
 M  +1 -1      chatwindow.h  
 M  +0 -1      inputfilter.h  
 M  +37 -3     server.cpp  
 M  +3 -2      server.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=799159