add exit command in proxy sessions
This commit is contained in:
@@ -220,6 +220,7 @@ Some commands only work on the game server and not on the proxy server. The chat
|
||||
* `$arrow <color-id>`: Changes your lobby arrow color.
|
||||
* `$secid <section-id>`: Sets your override section ID. After running this command, any games you create will use your override section ID for rare drops instead of your character's actual section ID. To revert to your actual section id, run `$secid` with no name after it.
|
||||
* `$rand <seed>`: Sets your override random seed (specified as a 32-bit hex value). This will make any games you create use the given seed for rare enemies. This also makes item drops deterministic in Blue Burst games hosted by newserv. On the proxy server, this command can cause desyncs with other players in the same game, since they will not see the overridden random seed. To remove the override, run `$rand` with no arguments.
|
||||
* `$exit` (proxy server only): Ends your proxy session and returns you to the main menu. Can only be used from the lobby.
|
||||
|
||||
* Blue Burst player commands (game server only)
|
||||
* `$bbchar <username> <password> <1-4>`: Use this command when playing on a non-BB version of PSO. If the username and password are correct, this command converts your current character to BB format and saves it on the server in the given slot. Any character already in that slot is overwritten.
|
||||
|
||||
@@ -259,6 +259,15 @@ static void server_command_persist(shared_ptr<ServerState>, shared_ptr<Lobby> l,
|
||||
}
|
||||
}
|
||||
|
||||
static void proxy_command_exit(shared_ptr<ServerState>,
|
||||
ProxyServer::LinkedSession& session, const std::u16string&) {
|
||||
if (session.is_in_game) {
|
||||
send_text_message(session.client_channel, u"$C6You must return to\nthe lobby first");
|
||||
} else {
|
||||
session.send_to_game_server();
|
||||
}
|
||||
}
|
||||
|
||||
static void server_command_get_self_card(shared_ptr<ServerState>, shared_ptr<Lobby>,
|
||||
shared_ptr<Client> c, const std::u16string&) {
|
||||
send_guild_card(c, c);
|
||||
@@ -1074,6 +1083,7 @@ static const unordered_map<u16string, ChatCommandDefinition> chat_commands({
|
||||
{u"$dbgid", {server_command_dbgid, nullptr, u"Usage:\ndbgid"}},
|
||||
{u"$edit", {server_command_edit, nullptr , u"Usage:\nedit <stat> <value>"}},
|
||||
{u"$event", {server_command_lobby_event, proxy_command_lobby_event, u"Usage:\nevent <name>"}},
|
||||
{u"$exit", {nullptr, proxy_command_exit, u"Usage:\nexit"}},
|
||||
{u"$gc", {server_command_get_self_card, proxy_command_get_player_card, u"Usage:\ngc"}},
|
||||
{u"$infhp", {server_command_infinite_hp, proxy_command_infinite_hp, u"Usage:\ninfhp"}},
|
||||
{u"$inftp", {server_command_infinite_tp, proxy_command_infinite_tp, u"Usage:\ninftp"}},
|
||||
|
||||
Reference in New Issue
Block a user