From 3a9543178abb7500aff65e09f054c28200ca6cac Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 19 May 2014 21:16:29 +0100 Subject: cCompositeChat message type is now formatted --- src/CompositeChat.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/CompositeChat.h') diff --git a/src/CompositeChat.h b/src/CompositeChat.h index a0264d864..209d9d925 100644 --- a/src/CompositeChat.h +++ b/src/CompositeChat.h @@ -47,6 +47,7 @@ public: ePartType m_PartType; AString m_Text; AString m_Style; + AString m_AdditionalStyleData; cBasePart(ePartType a_PartType, const AString & a_Text, const AString & a_Style = ""); @@ -169,7 +170,7 @@ public: void ParseText(const AString & a_ParseText); /** Sets the message type, which is indicated by prefixes added to the message when serializing. */ - void SetMessageType(eMessageType a_MessageType); + void SetMessageType(eMessageType a_MessageType, const AString & a_AdditionalMessageTypeata = ""); /** Adds the "underline" style to each part that is an URL. */ void UnderlineUrls(void); @@ -178,6 +179,9 @@ public: /** Returns the message type set previously by SetMessageType(). */ eMessageType GetMessageType(void) const { return m_MessageType; } + + /** Returns additional data pertaining to message type, for example, the name of a mtPrivateMsg sender */ + AString GetAdditionalMessageTypeData(void) const { return m_AdditionalMessageTypeData; } /** Returns the text from the parts that comprises the human-readable data. Used for older protocols that don't support composite chat @@ -199,6 +203,9 @@ protected: /** The message type, as indicated by prefixes. */ eMessageType m_MessageType; + /** Additional data pertaining to message type, for example, the name of a mtPrivateMsg sender */ + AString m_AdditionalMessageTypeData; + /** Adds a_AddStyle to a_Style; overwrites the existing style if appropriate. If the style already contains something that a_AddStyle overrides, it is erased first. */ -- cgit v1.2.3