diff options
author | Joursoir <chat@joursoir.net> | 2020-12-11 18:57:13 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2020-12-11 18:57:13 +0000 |
commit | 845c0262f4ab243748b085c2608c0e3e28799a0a (patch) | |
tree | 595625578dbbc3216e254564259a8d0b4ff9f32b /src/client/clui/Client.cpp | |
parent | 05750c44046f320109055aa5954ef0bbd977705f (diff) | |
download | want-chat-845c0262f4ab243748b085c2608c0e3e28799a0a.tar.gz want-chat-845c0262f4ab243748b085c2608c0e3e28799a0a.tar.bz2 want-chat-845c0262f4ab243748b085c2608c0e3e28799a0a.zip |
clui feature: handle players and online info from server, show it
Diffstat (limited to 'src/client/clui/Client.cpp')
-rw-r--r-- | src/client/clui/Client.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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) |