X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fircserverhandler.cpp;h=e46bb737972023e30a2b4e5629aca07a2c0e5c16;hb=e0872cf3b3cdb8c52c5a52f32c3140143a29409d;hp=3b58903c4fd19b564d081cd61aa4f3746bbc130a;hpb=da3aa4136fe01e142238f0f42fe1273481037b9d;p=quassel.git diff --git a/src/core/ircserverhandler.cpp b/src/core/ircserverhandler.cpp index 3b58903c..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) { @@ -312,7 +312,7 @@ void IrcServerHandler::handlePrivmsg(const QString &prefix, const QList ¶ms) { IrcUser *ircuser = network()->updateNickFromMask(prefix); - Q_ASSERT(ircuser); + if(!ircuser) return; QString msg; if(params.count()) @@ -326,9 +326,10 @@ void IrcServerHandler::handleQuit(const QString &prefix, const QList void IrcServerHandler::handleTopic(const QString &prefix, const QList ¶ms) { IrcUser *ircuser = network()->updateNickFromMask(prefix); + if(!ircuser) return; QString channel = serverDecode(params[0]); - QString topic = channelDecode(channel, params[1]); - Q_ASSERT(ircuser); + QString topic; + if(params.count() >= 2) topic = channelDecode(channel, params[1]); network()->ircChannel(channel)->setTopic(topic); @@ -463,7 +464,9 @@ void IrcServerHandler::handle314(const QString &prefix, const QList /* RPL_ENDOFWHO: " :End of WHO list" */ void IrcServerHandler::handle315(const QString &prefix, const QList ¶ms) { Q_UNUSED(prefix) - emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Who] %1").arg(serverDecode(params).join(" "))); + // FIXME temporarily made silent + Q_UNUSED(params) + // emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Who] %1").arg(serverDecode(params).join(" "))); } /* RPL_WHOISIDLE - " :seconds idle" @@ -538,7 +541,8 @@ void IrcServerHandler::handle352(const QString &prefix, const QList ircuser->setRealName(serverDecode(params.last()).section(" ", 1)); } - emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Who] %1").arg(serverDecode(params).join(" "))); + // FIXME temporarily made silent + //emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Who] %1").arg(serverDecode(params).join(" "))); } /* RPL_NAMREPLY */