Fixed a bug in the new topic widget where no repaint event was triggered if only...
[quassel.git] / src / common / message.cpp
index 91e1f49..8c0ebb3 100644 (file)
@@ -107,6 +107,8 @@ void Message::format() {
   switch(type()) {
     case Message::Plain:
       s = tr("%DS<%1>").arg(nick); t = tr("%D0%1").arg(txt); break;
+    case Message::Notice:
+      s = tr("%Dn[%1]").arg(nick); t = tr("%Dn%1").arg(txt); break;
     case Message::Server:
       s = tr("%Ds*"); t = tr("%Ds%1").arg(txt); break;
     case Message::Error:
@@ -176,7 +178,7 @@ QString Message::formattedToHtml(const QString &f) {
 */
 
 QDataStream &operator<<(QDataStream &out, const Message &msg) {
-  out << (quint32)msg.timestamp().toTime_t() << (quint32)msg.type() << (quint8)msg.flags()
+  out << msg.msgId() << (quint32)msg.timestamp().toTime_t() << (quint32)msg.type() << (quint8)msg.flags()
       << msg.bufferInfo() << msg.sender().toUtf8() << msg.text().toUtf8();
   return out;
 }
@@ -187,7 +189,7 @@ QDataStream &operator>>(QDataStream &in, Message &msg) {
   quint32 ts;
   QByteArray s, m;
   BufferInfo buf;
-  in >> ts >> t >> f >> buf >> s >> m;
+  in >> msg._msgId >> ts >> t >> f >> buf >> s >> m;
   msg._type = (Message::Type)t;
   msg._flags = (quint8)f;
   msg._bufferInfo = buf;