- MessageTypes are now binary exclusive which allows easy checks with multimple condi...
[quassel.git] / src / common / message.cpp
index e09457a..4a6ba91 100644 (file)
@@ -44,6 +44,10 @@ Message::Message(QDateTime ts,BufferInfo bufferInfo, Type type, QString text, QS
 {
 }
 
+void Message::setFlags(quint8 flags) {
+  _flags = flags;
+}
+
 QString Message::mircToInternal(QString mirc) {
   mirc.replace('%', "%%");      // escape % just to be sure
   mirc.replace('\x02', "%B");
@@ -172,13 +176,14 @@ QString Message::formattedToHtml(const QString &f) {
 */
 
 QDataStream &operator<<(QDataStream &out, const Message &msg) {
-  out << (quint32)msg.timestamp().toTime_t() << (quint8)msg.type() << (quint8)msg.flags()
+  out << (quint32)msg.timestamp().toTime_t() << (quint32)msg.type() << (quint8)msg.flags()
       << msg.bufferInfo() << msg.sender().toUtf8() << msg.text().toUtf8();
   return out;
 }
 
 QDataStream &operator>>(QDataStream &in, Message &msg) {
-  quint8 t, f;
+  quint8 f;
+  quint32 t;
   quint32 ts;
   QByteArray s, m;
   BufferInfo buf;