mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 14:02:59 +01:00
Resolve #5140: Headless server saves default user.json
This commit is contained in:
committed by
Ted John
parent
c4e89278c1
commit
b3e079c7fa
@@ -302,6 +302,14 @@ bool Network::BeginServer(uint16 port, const char* address)
|
||||
player->Group = 0;
|
||||
player_id = player->Id;
|
||||
|
||||
if (network_get_mode() == NETWORK_MODE_SERVER) {
|
||||
// Add SERVER to users.json and save.
|
||||
NetworkUser *networkUser = _userManager.GetOrAddUser(player->KeyHash);
|
||||
networkUser->GroupId = player->Group;
|
||||
networkUser->Name = player->Name;
|
||||
_userManager.Save();
|
||||
}
|
||||
|
||||
printf("Ready for clients...\n");
|
||||
network_chat_show_connected_message();
|
||||
network_chat_show_server_greeting();
|
||||
|
||||
Reference in New Issue
Block a user