First of all, takeFirst() does not work on a const ref *cough*. And second, we should
not reorder the param in the message like we did before purely for prettyness;
some servers seem to send non-standard strings that then look awkward. Instead,
let's just add a colon after the first param.
displayMsg(e, Message::Error, e->params().join(" "), e->prefix());
break;
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;
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);
if(!checkParamCount(e, 1))
return;
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());
if(!checkParamCount(e, 1))
return;
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(" "));