summaryrefslogtreecommitdiffstats
path: root/src/CompositeChat.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-01 09:32:14 +0200
committermadmaxoft <github@xoft.cz>2014-04-01 09:32:14 +0200
commit7aa6a3b86663ef28295ffb914f66a8f0359a353f (patch)
tree13285d8d715722e89c5eb61b40b0550b82858c4b /src/CompositeChat.cpp
parentAPIDump: Documented the cCompositeChat support in logging functions. (diff)
downloadcuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar.gz
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar.bz2
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar.lz
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar.xz
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar.zst
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.zip
Diffstat (limited to 'src/CompositeChat.cpp')
-rw-r--r--src/CompositeChat.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/CompositeChat.cpp b/src/CompositeChat.cpp
index 918e4f90e..c70ef1070 100644
--- a/src/CompositeChat.cpp
+++ b/src/CompositeChat.cpp
@@ -343,6 +343,29 @@ AString cCompositeChat::ExtractText(void) const
+cMCLogger::eLogLevel cCompositeChat::MessageTypeToLogLevel(eMessageType a_MessageType)
+{
+ switch (a_MessageType)
+ {
+ case mtCustom: return cMCLogger::llRegular;
+ case mtFailure: return cMCLogger::llWarning;
+ case mtInformation: return cMCLogger::llInfo;
+ case mtSuccess: return cMCLogger::llRegular;
+ case mtWarning: return cMCLogger::llWarning;
+ case mtFatal: return cMCLogger::llError;
+ case mtDeath: return cMCLogger::llRegular;
+ case mtPrivateMessage: return cMCLogger::llRegular;
+ case mtJoin: return cMCLogger::llRegular;
+ case mtLeave: return cMCLogger::llRegular;
+ }
+ ASSERT(!"Unhandled MessageType");
+ return cMCLogger::llError;
+}
+
+
+
+
+
void cCompositeChat::AddStyle(AString & a_Style, const AString & a_AddStyle)
{
if (a_AddStyle.empty())