| Summary: | To keep inform in the query window when the contact disconect | ||
|---|---|---|---|
| Product: | [Applications] konversation | Reporter: | Nicolas L. <kde> |
| Component: | general | Assignee: | Konversation Bugs <konversation-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Mandrake RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Nicolas L.
2005-04-11 17:25:14 UTC
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);
|