use disconnect_client for the kick and ban commands

This commit is contained in:
Martin Michelsen
2025-01-17 21:05:40 -08:00
parent e2caf81e4b
commit 6e9d86a6ca
2 changed files with 15 additions and 3 deletions
+1 -1
View File
@@ -655,7 +655,7 @@ ShellCommand c_kick(
+[](ShellCommand::Args& args) -> std::deque<std::string> {
auto target = args.s->find_client(&args.args);
send_message_box(target, "$C6You have been kicked off the server.");
target->should_disconnect = true;
args.s->game_server->disconnect_client(target);
return {phosg::string_printf("Client C-%" PRIX64 " disconnected from server", target->id)};
});