[Konversation-devel] [Bug 103670] To keep inform in the query window when the contact disconect

Dario Abatianni eisfuchs at tigress.com
Fri Jan 13 00:28:51 CET 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=103670         
eisfuchs tigress com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From eisfuchs tigress com  2006-01-13 00:28 -------
SVN commit 497517 by abatianni:

BUG:103670 - show quit and reason in query if we see a nick leave the server

 M  +13 -0     query.cpp  
 M  +6 -0      query.h  
 M  +7 -1      server.cpp  


--- trunk/extragear/network/konversation/src/query.cpp #497516:497517
 @ -484,4 +484,17  @
     emit updateInfo(info);
 }
 
+// show quit message of nick if we see it
+void Query::quitNick(const QString& reason)
+{
+  QString displayReason;
+
+  if(!reason.isEmpty())
+  {
+    displayReason=" ("+reason+")";
+  }
+
+  appendCommandMessage(i18n("Quit"),i18n("%1 has left this server%2.").arg(getName()).arg(displayReason),false);
+}
+
 #include "query.moc"
--- trunk/extragear/network/konversation/src/query.h #497516:497517
 @ -62,6 +62,12  @
 
         virtual bool areIRCColorsSupported() {return true; }
         virtual bool isInsertCharacterSupported() { return true; }
+
+        /** call this when you see a nick quit from the server.
+         *   param reason The quit reason given by that user.
+         */
+        void quitNick(const QString& reason);
+
         signals:
         void sendFile(const QString& recipient);
 
--- trunk/extragear/network/konversation/src/server.cpp #497516:497517
 @ -1034,7 +1034,7  @
         m_processingIncoming = true;
         QString front(inputBuffer.front());
         inputBuffer.pop_front();
-        if(rawLog) 
+        if(rawLog)
         {
             QString toRaw = front;
             rawLog->appendRaw("&gt;&gt; " + toRaw.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;"));
 @ -2678,6 +2678,12  @
         channel=nextchannel;
     }
 
+    Query* query=getQueryByName(nickname);
+    if(query)
+    {
+      query->quitNick(reason);
+    }
+
     // Delete the nick from all channels and then delete the nickinfo,
     // emitting signal if on the watch list.
     setNickOffline(nickname);


More information about the Konversation-devel mailing list