-/*
- static Message plain(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message notice(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message action(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message nick(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message mode(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message join(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message part(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message quit(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message kick(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message kill(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message server(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message info(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
- static Message error(QString _target, QString _text, QString _sender = "", quint8 _flags = None);
-*/
+ QString formattedTimestamp();
+ QString formattedSender();
+ QString formattedText();
+
+ //static QString formattedToHtml(const QString &);
+
+ /** Convert mIRC control codes to our own */
+ static QString mircToInternal(QString);
+
+ void format();
+
+private:
+ QDateTime _timestamp;
+ MsgId _msgId;
+ BufferInfo _bufferInfo;
+ QString _text;
+ QString _sender;
+ Type _type;
+ quint8 _flags;
+
+ QString _formattedTimestamp, _formattedSender, _formattedText; // cache
+
+
+ friend QDataStream &operator>>(QDataStream &in, Message &msg);