Skip to content

Commit

Permalink
fix: update ghost spectators on op status change
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenapte committed Jan 10, 2025
1 parent dce8ee3 commit 1ac83c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BallanceMMOServer/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,12 @@ class server: public role {
}
}
config_.op_players[name] = bmmo::string_utils::get_uuid_string(clients_[client].uuid);
ghost_spectator_clients_.insert(client);
Printf(bmmo::color_code(bmmo::OpState), "%s is now an operator.", name);
} else {
if (!config_.op_players.erase(name))
return;
ghost_spectator_clients_.erase(client);
Printf(bmmo::color_code(bmmo::OpState), "%s is no longer an operator.", name);
}
config_.save();
Expand Down

0 comments on commit 1ac83c0

Please sign in to comment.