Fix output for a bunch of numeric server replies
[quassel.git] / src / core / eventstringifier.cpp
index 1023102..688886e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2010 by the Quassel Project                        *
+ *   Copyright (C) 2005-2012 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -92,13 +92,14 @@ void EventStringifier::processIrcEventNumeric(IrcEventNumeric *e) {
     displayMsg(e, Message::Error, e->params().join(" "), e->prefix());
     break;
 
-  // Server error messages, display them in red. First param will be appended.
+  // Server error messages, display them in red. Colon between first param and rest.
   case 401: {
     if(!checkParamCount(e, 1))
       return;
 
-    QString target = e->params().takeFirst();
-    displayMsg(e, Message::Error, e->params().join(" ") + " " + target, e->prefix(), target, Message::Redirected);
+    QStringList params = e->params();
+    QString target = params.takeFirst();
+    displayMsg(e, Message::Error, target + ": " + params.join(" "), e->prefix(), target, Message::Redirected);
     break;
   }
 
@@ -106,8 +107,9 @@ void EventStringifier::processIrcEventNumeric(IrcEventNumeric *e) {
     if(!checkParamCount(e, 1))
       return;
 
-    QString channelName = e->params().takeFirst();
-    displayMsg(e, Message::Error, e->params().join(" ") + " " + channelName, e->prefix());
+    QStringList params = e->params();
+    QString channelName = params.takeFirst();
+    displayMsg(e, Message::Error, channelName + ": " + params.join(" "), e->prefix());
     break;
   }
 
@@ -119,8 +121,9 @@ void EventStringifier::processIrcEventNumeric(IrcEventNumeric *e) {
     if(!checkParamCount(e, 1))
       return;
 
-    QString p = e->params().takeFirst();
-    displayMsg(e, Message::Error, p + ": " + e->params().join(" "));
+    QStringList params = e->params();
+    QString p = params.takeFirst();
+    displayMsg(e, Message::Error, p + ": " + params.join(" "));
     break;
   }