|
R-Type
Networked shoot'em up built on Aegis2D
|
The commands of the server's administrator, on the engine's command system. More...
#include </__w/project-rtype/project-rtype/server/include/rtype/admin_console.hpp>
Public Member Functions | |
| AdminConsole (ServerNetwork &network, std::function< void()> stop) | |
| Creates the commands. | |
| aegis2d::core::CommandResult | run (std::string_view line) |
| Runs a line typed by the administrator. | |
The commands of the server's administrator, on the engine's command system.
rooms: the rooms in use, their players and whether they play;players: every session, with its room (or the lobby), its number and its address;say <text>: a message of the server to every player (RFC section 3.8);close <room>: ends the sessions of a room, each told RoomClosed;kick <player>: ends a player's session, telling it (Kicked) and the others;ban <player>: the same (Banned), and its address may not log in again, even after a restart (ServerNetwork::bans());stop: stops the server, as Ctrl+C does (the stop given, request_stop() in r-type_server);help, help <command>: what the commands do.A wrong command, a missing or bad argument, or a command that cannot be done (a room not in use, a text too long) says why and changes nothing. Use it on the network's thread.
| rtype::AdminConsole::AdminConsole | ( | ServerNetwork & | network, |
| std::function< void()> | stop | ||
| ) |
Creates the commands.
| network | The server's sockets and sessions; it must outlive the console. |
| stop | What stop does, such as request_stop(). |
| aegis2d::core::CommandResult rtype::AdminConsole::run | ( | std::string_view | line | ) |
Runs a line typed by the administrator.
| line | Such as "close 1". |