implement episode 3 battles

This commit is contained in:
Martin Michelsen
2022-11-09 22:48:27 -08:00
parent 8481ba23c5
commit 9f2f0ccc14
41 changed files with 19300 additions and 2891 deletions
+8 -4
View File
@@ -144,11 +144,15 @@ void Server::on_client_input(Channel& ch, uint16_t command, uint32_t flag, std::
if (c->should_disconnect) {
server->disconnect_client(c);
} else {
try {
if (server->state->catch_handler_exceptions) {
try {
on_command(server->state, c, command, flag, data);
} catch (const exception& e) {
server_log.warning("Error processing client command: %s", e.what());
c->should_disconnect = true;
}
} else {
on_command(server->state, c, command, flag, data);
} catch (const exception& e) {
server_log.warning("Error processing client command: %s", e.what());
c->should_disconnect = true;
}
if (c->should_disconnect) {
server->disconnect_client(c);