summaryrefslogtreecommitdiffstats
path: root/src/Root.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-04 23:39:57 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-04 23:39:57 +0100
commit9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be (patch)
tree9615b05c74b4745914882d76a61fad5ab1af32fd /src/Root.h
parentPickup constructor no longer exported (diff)
downloadcuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar.gz
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar.bz2
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar.lz
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar.xz
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar.zst
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.zip
Diffstat (limited to '')
-rw-r--r--src/Root.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Root.h b/src/Root.h
index c59afc810..fa52c21a1 100644
--- a/src/Root.h
+++ b/src/Root.h
@@ -3,6 +3,7 @@
#include "Authenticator.h"
#include "HTTPServer/HTTPServer.h"
+#include "Defines.h"
@@ -98,9 +99,6 @@ public:
/// Saves all chunks in all worlds
void SaveAllChunks(void); // tolua_export
- /// Sends a chat message to all connected clients (in all worlds)
- void BroadcastChat(const AString & a_Message); // tolua_export
-
/// Calls the callback for each player in all worlds
bool ForEachPlayer(cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS <<
@@ -109,6 +107,16 @@ public:
// tolua_begin
+ /// Sends a chat message to all connected clients (in all worlds)
+ void BroadcastChat(const AString & a_Message);
+ void BroadcastChatInfo(const AString & a_Message) { BroadcastChat(AppendChatEpithet(a_Message, mtInformation)); }
+ void BroadcastChatFailure(const AString & a_Message) { BroadcastChat(AppendChatEpithet(a_Message, mtFailure)); }
+ void BroadcastChatSuccess(const AString & a_Message) { BroadcastChat(AppendChatEpithet(a_Message, mtSuccess)); }
+ void BroadcastChatWarning(const AString & a_Message) { BroadcastChat(AppendChatEpithet(a_Message, mtWarning)); }
+ void BroadcastChatFatal(const AString & a_Message) { BroadcastChat(AppendChatEpithet(a_Message, mtFailure)); }
+ void BroadcastChatDeath(const AString & a_Message) { BroadcastChat(AppendChatEpithet(a_Message, mtDeath)); }
+ void BroadcastChatPrivateMsg(const AString & a_Message) { BroadcastChat(AppendChatEpithet(a_Message, mtPrivateMessage)); }
+
/// Returns the textual description of the protocol version: 49 -> "1.4.4". Provided specifically for Lua API
static AString GetProtocolVersionTextFromInt(int a_ProtocolVersionNum);