Bug 121768 - konvi 0.19 autojoins when using Quick Connect, 0.18 did not
Summary: konvi 0.19 autojoins when using Quick Connect, 0.18 did not
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-11 16:24 UTC by Benno Schulenberg
Modified: 2006-08-19 23:05 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 Benno Schulenberg 2006-02-11 16:24:53 UTC
Version:           0.19 (using KDE KDE 3.5.1)
Installed from:    Gentoo Packages
Compiler:          gcc-3.4.5 hardened
OS:                Linux

When using F7 (Quick Connect) to connect to a server that is also in the Server List (F4), then version 0.19 now behaves as if I chose the first entry in this Server List and does the autojoins specified by that entry, whereas version 0.18 did nothing of the sort (it only made the connection to the server).

This latter thing is what I expect from Quick Connect: to connect me to the specified server.  If I want it to autojoin channels too, I would choose the relevant entry in the Server List instead.
Comment 1 Benno Schulenberg 2006-02-11 21:50:36 UTC
Also, later in the server tab I noticed a line like this:

  [21:34] [Error] tavla: No such channel.

Apparently, when using F7 and using a nick that differs from the one in the Default Identity (or from the one in the first entry in the Server List), konvi also tries to autojoin a channel using the default nick as a channel name.
Comment 2 Niek Beernink 2006-08-09 11:05:29 UTC
This also happens in the SVN version for me.
Comment 3 Eike Hein 2006-08-10 23:15:02 UTC
The quick connect codepath in 0.19 is smarter than the one in 0.18 in that it is capable of recognizing the server given as being part of a network and loading the correct identity (the same goes for the /server command, which also recognized network names starting in 0.19). That said, I remember explicitly crafting it in such a fashion that auto-join would be disengage on quick connect for the same reasons you state. I guess it got broken before the release was pushed out of the door, however.

I have a number of things to fix in the connection instanciation code for 0.20 to improve the usability of the Server List dialog; I'll look into this one, too, at that time. Probably after the feature freeze.
Comment 4 Eike Hein 2006-08-19 23:05:26 UTC
SVN commit 574682 by hein:

Fix quick connect auto-joining the channels of the network
the server is recognized as being part of. This is a pile-on
patch fix; we need to refactor this to look better when we
have more time to spare (but we knew that already).
BUG:121768


 M  +12 -2     server.cpp  
 M  +2 -0      server.h  


--- trunk/extragear/network/konversation/src/server.cpp #574681:574682
@@ -59,6 +59,8 @@
 
 Server::Server(ViewContainer* viewContainer, int serverGroupId, bool clearQuickServerList)
 {
+    quickConnect = false;
+
     m_serverGroup = Preferences::serverGroupById(serverGroupId);
 
     if (clearQuickServerList)
@@ -67,12 +69,14 @@
     bot = getIdentity()->getBot();
     botPassword = getIdentity()->getPassword();
 
-    init(viewContainer, getIdentity()->getNickname(0),"");
+    init(viewContainer, getIdentity()->getNickname(0), "");
 }
 
 Server::Server(ViewContainer* viewContainer,const QString& hostName,const QString& port,
 const QString& channel,const QString& _nick, QString password,const bool& useSSL)
 {
+    quickConnect = true;
+
     QString nick( _nick );
 
     m_quickServer.setServer(hostName);
@@ -101,7 +105,7 @@
     if (nick.isEmpty())
         nick = getIdentity()->getNickname(0);
 
-    init(viewContainer, nick, channel);
+    init (viewContainer, nick, channel);
 }
 
 void Server::doPreShellCommand()
@@ -3056,6 +3060,12 @@
 {
     Konversation::ChannelList tmpList = m_serverGroup->channelList();
 
+    if (quickConnect && channel.isEmpty())
+    {
+        setAutoJoin(false);
+        return;
+    }
+
     if(!channel.isEmpty())
         tmpList.push_front(channel);
 
--- trunk/extragear/network/konversation/src/server.h #574681:574682
@@ -581,6 +581,8 @@
         bool autoReconnect;
         bool deliberateQuit;
 
+        bool quickConnect;
+
         QString autoJoinChannel;
         QString autoJoinChannelKey;