Bug 97535 - irc protocol handler creates gratuitous new server connection
Summary: irc protocol handler creates gratuitous new server connection
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-20 16:33 UTC by Nathaniel W. Turner
Modified: 2010-07-01 15:57 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 Nathaniel W. Turner 2005-01-20 16:33:20 UTC
Version:           0.16 #2075 (using KDE 3.3.2,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-6)
OS:                Linux (i686) release 2.6.8-2-k7

The scenario:
I'm logged in to irc.freenode.net, on #konversation.
I click on a irc://irc.freenode.net/arch link.

What konvi does:
It creates a new server connection to irc.freenode.net, complete with different nick, etc. and then joins #arch on that connection.

What konvi should do:
If I'm already on the target server, don't open a new connection; just join the channel.
Comment 1 Ismail Donmez 2005-01-28 21:07:53 UTC
CVS commit by cartman: 


When following irc:/ links don't create unneeded server connections
BUG:97535


  M +6 -1      konversationapplication.cpp   1.225


--- kdeextragear-2/konversation/konversation/konversationapplication.cpp  #1.224:1.225
@@ -1442,4 +1442,9 @@ void KonversationApplication::dcopConnec
                                                   const QString& password)
 {
+  Server* server = getServerByName(url);
+
+  if(server)
+    server->sendJoinCommand(channel);
+  else
   quickConnectToServer(url, QString::number(port), channel, password);
 }


Comment 2 Ismail Donmez 2010-07-01 15:57:51 UTC
commit 6812a9ec88a7fc7347780449050b39a0ef6aea57
Author: İsmail Dönmez <ismail@kde.org>
Date:   Fri Jan 28 20:07:48 2005 +0000

    When following irc:/ links don't create unneeded server connections
    BUG:97535
    
    svn path=/trunk/kdeextragear-2/konversation/; revision=383395

diff --git a/konversation/konversationapplication.cpp b/konversation/konversationapplication.cpp
index fa9bf8b..eb2b1d4 100644
--- a/konversation/konversationapplication.cpp
+++ b/konversation/konversationapplication.cpp
@@ -1441,7 +1441,12 @@ void KonversationApplication::sendMultiServerCommand(const QString& command, con
 void KonversationApplication::dcopConnectToServer(const QString& url, int port, const QString& channel, 
 						  const QString& password)
 {
-  quickConnectToServer(url, QString::number(port), channel, password);
+  Server* server = getServerByName(url);
+
+  if(server)
+    server->sendJoinCommand(channel);
+  else
+    quickConnectToServer(url, QString::number(port), channel, password);
 }
 
 Konversation::Sound* KonversationApplication::sound()