From a5d15a716f6e7e21a67529478f77851d15defe09 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sun, 13 Dec 2020 18:39:20 +0000 Subject: changes in work spec-symbols have done; server: send info about online and players --- src/server/ChatRoom.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/server/ChatRoom.cpp') diff --git a/src/server/ChatRoom.cpp b/src/server/ChatRoom.cpp index 9d99251..f3efe96 100644 --- a/src/server/ChatRoom.cpp +++ b/src/server/ChatRoom.cpp @@ -41,7 +41,7 @@ void ChatRoom::HandleMessage(UserInfo *u, const char *str) char *msg = new char[max_msg_len]; sprintf(msg, "%s: %s", u->GetName(), str); - users->SendAllUsers(msg, 0, usual_msg); + users->SendAllUsers(msg, 0, USUAL_CHAR); delete[] msg; } @@ -58,6 +58,8 @@ const char *ChatRoom::GetSecretPass() void ChatRoom::AddSession(UserInfo *u) { users->AddUser(u); + users->SendAllUsersOnline(RONLINE_CHAR); + users->SendAllUsersName(); if(code == std_id_lobby) return; @@ -92,6 +94,8 @@ void ChatRoom::RemoveSession(UserInfo *u) } users->RemoveUser(u); + users->SendAllUsersOnline(RONLINE_CHAR); + users->SendAllUsersName(); if(code != std_id_lobby && users->GetOnline() < 1) the_server->DeleteRoom(code); } @@ -140,6 +144,7 @@ void ChatRoom::Identification(UserInfo *u, const char *str) } // query to server + users->SendAllUsersName(); delete[] msg; delete ans; } -- cgit v1.2.3-18-g5258