aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorKonstantin Yeliseyev <kay27@bk.ru>2021-03-30 05:34:47 +0000
committersfan5 <sfan5@live.de>2021-04-10 17:51:40 +0200
commitcff847273af1fc1fad542ba04fa9a4ef131df532 (patch)
treec5513b6da3f4ebb40be9370cbb0f3e701c477e7a /src/script/lua_api
parente669f8db9b6a570b42325723ae61f9a00e645db5 (Currently translated at 100.0% (1356 of 1356 strings)
Diffstat (limited to 'src/script/lua_api')
0 files changed, 0 insertions, 0 deletions
a once #include "util/container.h" #include <string> #include <queue> #include "irrlichttypes.h" enum ChatEventType { CET_CHAT, CET_NICK_ADD, CET_NICK_REMOVE, CET_TIME_INFO, }; class ChatEvent { protected: ChatEvent(ChatEventType a_type) { type = a_type; } public: ChatEventType type; }; struct ChatEventTimeInfo : public ChatEvent { ChatEventTimeInfo( u64 a_game_time, u32 a_time) : ChatEvent(CET_TIME_INFO), game_time(a_game_time), time(a_time) {} u64 game_time; u32 time; }; struct ChatEventNick : public ChatEvent { ChatEventNick(ChatEventType a_type, const std::string &a_nick) : ChatEvent(a_type), // one of CET_NICK_ADD, CET_NICK_REMOVE nick(a_nick) {} std::string nick; }; struct ChatEventChat : public ChatEvent { ChatEventChat(const std::string &a_nick, const std::wstring &an_evt_msg) : ChatEvent(CET_CHAT), nick(a_nick), evt_msg(an_evt_msg) {} std::string nick; std::wstring evt_msg; }; struct ChatInterface { MutexedQueue<ChatEvent *> command_queue; // chat backend --> server MutexedQueue<ChatEvent *> outgoing_queue; // server --> chat backend };