| 485 | } |
| 486 | |
| 487 | NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_RCON(Packet &p) |
| 488 | { |
| 489 | if (this->status <= ADMIN_STATUS_AUTHENTICATE) return this->SendError(NETWORK_ERROR_NOT_EXPECTED); |
| 490 | |
| 491 | std::string command = p.Recv_string(NETWORK_RCONCOMMAND_LENGTH); |
| 492 | |
| 493 | Debug(net, 3, "[admin] Rcon command from '{}' ({}): {}", this->admin_name, this->admin_version, command); |
| 494 | |
| 495 | _redirect_console_to_admin = this->index; |
| 496 | IConsoleCmdExec(command); |
| 497 | _redirect_console_to_admin = AdminID::Invalid(); |
| 498 | return this->SendRconEnd(command); |
| 499 | } |
| 500 | |
| 501 | NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_GAMESCRIPT(Packet &p) |
| 502 | { |
nothing calls this directly
no test coverage detected