X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fircserverhandler.cpp;h=e46bb737972023e30a2b4e5629aca07a2c0e5c16;hp=0499c85901e76e8e152bc04fb35ea9e62d2dc22d;hb=3ed7d3bb6e9123ff0aa77023b264a39d1f63bd90;hpb=51a5077e9ce7044ea195fe71b112594367fac541 diff --git a/src/core/ircserverhandler.cpp b/src/core/ircserverhandler.cpp index 0499c859..e46bb737 100644 --- a/src/core/ircserverhandler.cpp +++ b/src/core/ircserverhandler.cpp @@ -162,20 +162,20 @@ void IrcServerHandler::defaultHandler(QString cmd, const QString &prefix, const // IRC SERVER HANDLER //******************************/ void IrcServerHandler::handleJoin(const QString &prefix, const QList ¶ms) { - Q_ASSERT(params.count() == 1); + if(params.count() < 1) return; QString channel = serverDecode(params[0]); IrcUser *ircuser = network()->updateNickFromMask(prefix); emit displayMsg(Message::Join, BufferInfo::ChannelBuffer, channel, channel, prefix); //qDebug() << "IrcServerHandler::handleJoin()" << prefix << params; ircuser->joinChannel(channel); - if(network()->isMe(ircuser)) network()->addPersistentChannel(channel, networkConnection()->channelKey(channel)); + if(network()->isMe(ircuser)) networkConnection()->setChannelJoined(channel); } void IrcServerHandler::handleKick(const QString &prefix, const QList ¶ms) { network()->updateNickFromMask(prefix); IrcUser *victim = network()->ircUser(params[1]); + if(!victim) return; QString channel = serverDecode(params[0]); - Q_ASSERT(victim); victim->partChannel(channel); @@ -278,7 +278,7 @@ void IrcServerHandler::handlePart(const QString &prefix, const QList msg = userDecode(ircuser->nick(), params[1]); emit displayMsg(Message::Part, BufferInfo::ChannelBuffer, channel, msg, prefix); - if(network()->isMe(ircuser)) network()->removePersistentChannel(channel); + if(network()->isMe(ircuser)) networkConnection()->setChannelParted(channel); } void IrcServerHandler::handlePing(const QString &prefix, const QList ¶ms) {