summaryrefslogtreecommitdiffstats
path: root/src/CompositeChat.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-13 20:27:10 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-13 20:27:10 +0200
commitf323955099eb19f5ff3969d09db05f58a842b95b (patch)
tree014ed1bb19075264929aa6a8b9e0094b3a3d863d /src/CompositeChat.h
parent1.8: Fixed maps. (diff)
downloadcuberite-f323955099eb19f5ff3969d09db05f58a842b95b.tar
cuberite-f323955099eb19f5ff3969d09db05f58a842b95b.tar.gz
cuberite-f323955099eb19f5ff3969d09db05f58a842b95b.tar.bz2
cuberite-f323955099eb19f5ff3969d09db05f58a842b95b.tar.lz
cuberite-f323955099eb19f5ff3969d09db05f58a842b95b.tar.xz
cuberite-f323955099eb19f5ff3969d09db05f58a842b95b.tar.zst
cuberite-f323955099eb19f5ff3969d09db05f58a842b95b.zip
Diffstat (limited to 'src/CompositeChat.h')
-rw-r--r--src/CompositeChat.h6
1 files changed, 6 insertions, 0 deletions
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 */