Bug 344225 - nicklist order weird on reconnects
Summary: nicklist order weird on reconnects
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-16 07:47 UTC by Harald Sitter
Modified: 2015-02-20 21:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2015-02-16 07:47:06 UTC
TLDR <Sho_> apachelogger: basically, the idea is that the nicklist is a loop (a -> b -> c -> back to a), and resetNickSelection() tries to make the first entry in the datastructure whatevet the next nick after the current nick is (e.g. if you're b, it will compute c -> a -> b)

Problem is that if I am on nick b, it should compute a->c->b as a is higher up in the preference list.

~~~

If one happens to get disconnected and times out subsequently Konversation will try to reconnect automatically. The logic for deciding which nick to use when this happens is flawed though as it *always* moves ahead one position in the list regardless of whether a previous nick is actually available.

In my particular case I have the following nick list:
a) sitter
b) sitter_
c) apachelogger

When experiencing sudden connection loss (e.g. by connecting to a VPN) a reconnect will happen after a couple hundred seconds which will then as expected use sitter_ as the nick. Waiting until sitter times out and then again having a connection loss (e.g. disconnecting from a VPN) will on the next reconnect move on to connect as apachelogger.
If one is on the second nick entry and gets a reconnect Konversation should use attempt to use the first nick what with it being higher up in the list thus it should have highest priority.


Reproducible: Always
Comment 1 Eike Hein 2015-02-20 21:09:58 UTC
Git commit b1dfa32c5c4122fafdd52a95225ff54de5ab4385 by Eike Hein.
Committed on 20/02/2015 at 21:08.
Pushed by hein into branch '1.6'.

Simplify Server::resetNickSelection().

Just skip over the current nick, don't try to make it the
invisible list head. This way we try harder to revert to
nicks early in the config-backed list.

M  +9    -13   src/irc/server.cpp

http://commits.kde.org/konversation/b1dfa32c5c4122fafdd52a95225ff54de5ab4385