From 845c0262f4ab243748b085c2608c0e3e28799a0a Mon Sep 17 00:00:00 2001 From: Joursoir Date: Fri, 11 Dec 2020 18:57:13 +0000 Subject: clui feature: handle players and online info from server, show it --- src/client/clui/Client.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/client/clui/Client.cpp') diff --git a/src/client/clui/Client.cpp b/src/client/clui/Client.cpp index 9859794..9b697b6 100644 --- a/src/client/clui/Client.cpp +++ b/src/client/clui/Client.cpp @@ -71,9 +71,16 @@ void Client::HandleActions() } } -void Client::AddMessage(const char *msg, int type) +void Client::AddMessage(const char *msg, const char spec_char) { - chat->AddMessage(msg, type); + if(spec_char == USERS_CHAR) + players->SetPlayersList(msg); + else if(spec_char == GONLINE_CHAR) + tips->SetGeneralOnline(msg); + else if(spec_char == RONLINE_CHAR) + tips->SetRoomOnline(msg); + else + chat->AddMessage(msg, spec_char); } void Client::AddCharToBuffer(char ch) -- cgit v1.2.3-18-g5258