Version: (using KDE KDE 3.3.2) Installed from: Mandrake RPMs it would be nice if in the query windows a message tell us if the contact disconnect
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(">> " + toRaw.replace("&","&").replace("<","<").replace(">",">")); @@ -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);