add --cat-client behavior

This commit is contained in:
Martin Michelsen
2022-07-20 23:05:47 -07:00
parent 5f836711c7
commit 4163f2affa
11 changed files with 499 additions and 252 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ using namespace std;
ServerShell::ServerShell(
shared_ptr<struct event_base> base,
shared_ptr<ServerState> state)
: Shell(base, state) { }
: Shell(base), state(state) { }
void ServerShell::print_prompt() {
fwritex(stdout, Shell::PROMPT);
@@ -305,7 +305,7 @@ Proxy commands (these will only work when exactly one client is connected):\n\
}
auto c = this->state->game_server->get_client();
send_command_with_header(c, data.data(), data.size());
send_command_with_header(c->channel, data.data(), data.size());
}
} else if ((command_name == "chat") || (command_name == "dchat")) {