projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixes #525 - using 'away' as ultimate fallback if no away reason is specified
[quassel.git]
/
src
/
core
/
ircserverhandler.cpp
diff --git
a/src/core/ircserverhandler.cpp
b/src/core/ircserverhandler.cpp
index
4d706d6
..
34573d9
100644
(file)
--- a/
src/core/ircserverhandler.cpp
+++ b/
src/core/ircserverhandler.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-0
8
by the Quassel Project *
+ * Copyright (C) 2005-0
9
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-94,6
+94,9
@@
void IrcServerHandler::handleServerMsg(QByteArray msg) {
params.removeFirst();
}
params.removeFirst();
}
+ // note that the IRC server is still alive
+ network()->resetPingTimeout();
+
// Now we try to find a handler for this message. BTW, I do love the Trolltech guys ;-)
handle(cmd, Q_ARG(QString, prefix), Q_ARG(QList<QByteArray>, params));
}
// Now we try to find a handler for this message. BTW, I do love the Trolltech guys ;-)
handle(cmd, Q_ARG(QString, prefix), Q_ARG(QList<QByteArray>, params));
}
@@
-306,11
+309,15
@@
void IrcServerHandler::handleNick(const QString &prefix, const QList<QByteArray>
? newnick
: prefix;
? newnick
: prefix;
+
+ // the order is cruicial
+ // otherwise the client would rename the buffer, see that the assigned ircuser doesn't match anymore
+ // and remove the ircuser from the querybuffer leading to a wrong on/offline state
+ ircuser->setNick(newnick);
coreSession()->renameBuffer(network()->networkId(), newnick, oldnick);
coreSession()->renameBuffer(network()->networkId(), newnick, oldnick);
+
foreach(QString channel, ircuser->channels())
emit displayMsg(Message::Nick, BufferInfo::ChannelBuffer, channel, newnick, sender);
foreach(QString channel, ircuser->channels())
emit displayMsg(Message::Nick, BufferInfo::ChannelBuffer, channel, newnick, sender);
-
- ircuser->setNick(newnick);
}
void IrcServerHandler::handleNotice(const QString &prefix, const QList<QByteArray> ¶ms) {
}
void IrcServerHandler::handleNotice(const QString &prefix, const QList<QByteArray> ¶ms) {