summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-07 19:58:52 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-07 19:58:52 +0100
commit88a64ec40df87f21a89de43fe8bb78f10ee7eeb7 (patch)
tree631707789a182751d5d7276fb54455d500f94c3b /src/Defines.h
parentServer internally uses new functions (diff)
downloadcuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar.gz
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar.bz2
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar.lz
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar.xz
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar.zst
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.zip
Diffstat (limited to 'src/Defines.h')
-rw-r--r--src/Defines.h64
1 files changed, 2 insertions, 62 deletions
diff --git a/src/Defines.h b/src/Defines.h
index 7fe93399d..177acefdf 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -448,6 +448,7 @@ enum ChatPrefixCodes
// http://forum.mc-server.org/showthread.php?tid=1212
// MessageType...
+ mtCustom, // Send raw data without any processing
mtFailure, // Something could not be done (i.e. command not executed due to insufficient privilege)
mtInformation, // Informational message (i.e. command usage)
mtSuccess, // Something executed successfully
@@ -459,70 +460,9 @@ enum ChatPrefixCodes
mtLeave, // A player has left the server
};
-
-
-
-inline AString AppendChatEpithet(const AString & a_ChatMessage, ChatPrefixCodes a_ChatPrefix)
-{
- AString Message;
-
- switch (a_ChatPrefix)
- {
- case mtFailure:
- {
- Message = Printf("%s[INFO] %s", cChatColor::Rose.c_str(), cChatColor::White.c_str());
- break;
- }
- case mtInformation:
- {
- Message = Printf("%s[INFO] %s", cChatColor::Yellow.c_str(), cChatColor::White.c_str());
- break;
- }
- case mtSuccess:
- {
- Message = Printf("%s[INFO] %s", cChatColor::Green.c_str(), cChatColor::White.c_str());
- break;
- }
- case mtWarning:
- {
- Message = Printf("%s[WARN] %s", cChatColor::Rose.c_str(), cChatColor::White.c_str());
- break;
- }
- case mtFatal:
- {
- Message = Printf("%s[FATAL] %s", cChatColor::Red.c_str(), cChatColor::White.c_str());
- break;
- }
- case mtDeath:
- {
- Message = Printf("%s[DEATH] %s", cChatColor::Gray.c_str(), cChatColor::White.c_str());
- break;
- }
- case mtPrivateMessage:
- {
- Message = Printf("%s[MSG] %s%s", cChatColor::LightBlue.c_str(), cChatColor::White.c_str(), cChatColor::Italic.c_str());
- break;
- }
- case mtJoin:
- {
- Message = Printf("%s[JOIN] %s", cChatColor::Yellow.c_str(), cChatColor::White.c_str());
- break;
- }
- case mtLeave:
- {
- Message = Printf("%s[LEAVE] %s", cChatColor::Yellow.c_str(), cChatColor::White.c_str());
- break;
- }
- default: ASSERT(!"Unhandled chat prefix type!"); return "";
- }
-
- Message.append(a_ChatMessage);
- return Message;
-}
-
// tolua_begin
-/// Normalizes an angle in degrees to the [-180, +180) range:
+/** Normalizes an angle in degrees to the [-180, +180) range: */
inline double NormalizeAngleDegrees(const double a_Degrees)
{
double Norm = fmod(a_Degrees + 180, 360);