Pressing enter in the topic line now sets the channel topic.
[quassel.git] / src / core / ircserverhandler.cpp
index 3b58903..0499c85 100644 (file)
@@ -312,7 +312,7 @@ void IrcServerHandler::handlePrivmsg(const QString &prefix, const QList<QByteArr
 
 void IrcServerHandler::handleQuit(const QString &prefix, const QList<QByteArray> &params) {
   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<QByteArray>
 
 void IrcServerHandler::handleTopic(const QString &prefix, const QList<QByteArray> &params) {
   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<QByteArray>
 /*  RPL_ENDOFWHO: "<name> :End of WHO list" */
 void IrcServerHandler::handle315(const QString &prefix, const QList<QByteArray> &params) {
   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 - "<nick> <integer> :seconds idle" 
@@ -538,7 +541,8 @@ void IrcServerHandler::handle352(const QString &prefix, const QList<QByteArray>
     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 */