X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fircserverhandler.cpp;h=5c60b3b8a169054b6141f8978e74dc6b5dde367a;hp=4d706d69805a6601efb417aa20cea8b4dff0b604;hb=4faeafb743766b345d5cadc5289840a981413853;hpb=44a6109557eafd29cc6079dd6521ad3cf80c15b3 diff --git a/src/core/ircserverhandler.cpp b/src/core/ircserverhandler.cpp index 4d706d69..5c60b3b8 100644 --- a/src/core/ircserverhandler.cpp +++ b/src/core/ircserverhandler.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -306,11 +306,15 @@ void IrcServerHandler::handleNick(const QString &prefix, const QList ? 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); + 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 ¶ms) {