From f323955099eb19f5ff3969d09db05f58a842b95b Mon Sep 17 00:00:00 2001 From: Howaner Date: Sat, 13 Sep 2014 20:27:10 +0200 Subject: Moved chat json creating to the CompositeChat class. --- src/CompositeChat.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/CompositeChat.h') diff --git a/src/CompositeChat.h b/src/CompositeChat.h index 2dc21b98f..369eed196 100644 --- a/src/CompositeChat.h +++ b/src/CompositeChat.h @@ -4,6 +4,7 @@ // Declares the cCompositeChat class used to wrap a chat message with multiple parts (text, url, cmd) #include "Defines.h" +#include "json/json.h" @@ -189,6 +190,8 @@ public: Used for older protocols that don't support composite chat and for console-logging. */ AString ExtractText(void) const; + + AString CreateJsonString(bool a_ShouldUseChatPrefixes = true) const; // tolua_end @@ -197,6 +200,9 @@ public: /** Converts the MessageType to a LogLevel value. Used by the logging bindings when logging a cCompositeChat object. */ static cLogger::eLogLevel MessageTypeToLogLevel(eMessageType a_MessageType); + + /** Adds the chat part's style (represented by the part's stylestring) into the Json object. */ + void AddChatPartStyle(Json::Value & a_Value, const AString & a_PartStyle) const; protected: /** All the parts that */ -- cgit v1.2.3