add $sb command
This commit is contained in:
@@ -439,7 +439,8 @@ Some commands only work on the game server and not on the proxy server. The chat
|
|||||||
* `$qsyncall <reg-num> <value>`: Set a quest register's value for everyone in the game. `<reg-num>` should be either rXX (e.g. r60) or fXX (e.g. f60); if the latter, `<value>` is parsed as a floating-point value instead of as an integer.
|
* `$qsyncall <reg-num> <value>`: Set a quest register's value for everyone in the game. `<reg-num>` should be either rXX (e.g. r60) or fXX (e.g. f60); if the latter, `<value>` is parsed as a floating-point value instead of as an integer.
|
||||||
* `$gc` (game server only): Send your own Guild Card to yourself.
|
* `$gc` (game server only): Send your own Guild Card to yourself.
|
||||||
* `$sc <data>`: Send a command to yourself.
|
* `$sc <data>`: Send a command to yourself.
|
||||||
* `$ss <data>` (proxy server only): Send a command to the remote server.
|
* `$ss <data>`: Send a command to the remote server (if in a proxy session) or to the game server.
|
||||||
|
* `$sb <data>`: Send a comamnd to yourself, and to the remote server or game server.
|
||||||
* `$meseta <amount>` (game server only; Episode 3 only): Add the given amount to your Meseta total.
|
* `$meseta <amount>` (game server only; Episode 3 only): Add the given amount to your Meseta total.
|
||||||
* `$auction` (Episode 3 only): Bring up the CARD Auction menu, regardless of how many players are in the game or if you have a VIP card.
|
* `$auction` (Episode 3 only): Bring up the CARD Auction menu, regardless of how many players are in the game or if you have a VIP card.
|
||||||
* `$ep3battledebug` (game server only; Episode 3 only): Enable or disable TCard00_Select. If enabled, the game will enter the debug menu when you start a battle.
|
* `$ep3battledebug` (game server only; Episode 3 only): Enable or disable TCard00_Select. If enabled, the game will enter the debug menu when you start a battle.
|
||||||
|
|||||||
+18
-1
@@ -747,6 +747,12 @@ static void server_command_send_client(shared_ptr<Client> c, const std::string&
|
|||||||
c->channel.send(data);
|
c->channel.send(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void server_command_send_server(shared_ptr<Client> c, const std::string& args) {
|
||||||
|
string data = parse_data_string(args);
|
||||||
|
data.resize((data.size() + 3) & (~3));
|
||||||
|
on_command_with_header(c, data);
|
||||||
|
}
|
||||||
|
|
||||||
static void proxy_command_send_client(shared_ptr<ProxyServer::LinkedSession> ses, const std::string& args) {
|
static void proxy_command_send_client(shared_ptr<ProxyServer::LinkedSession> ses, const std::string& args) {
|
||||||
string data = parse_data_string(args);
|
string data = parse_data_string(args);
|
||||||
data.resize((data.size() + 3) & (~3));
|
data.resize((data.size() + 3) & (~3));
|
||||||
@@ -759,6 +765,16 @@ static void proxy_command_send_server(shared_ptr<ProxyServer::LinkedSession> ses
|
|||||||
ses->server_channel.send(data);
|
ses->server_channel.send(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void server_command_send_both(shared_ptr<Client> c, const std::string& args) {
|
||||||
|
server_command_send_client(c, args);
|
||||||
|
server_command_send_server(c, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void proxy_command_send_both(shared_ptr<ProxyServer::LinkedSession> ses, const std::string& args) {
|
||||||
|
proxy_command_send_client(ses, args);
|
||||||
|
proxy_command_send_server(ses, args);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Lobby commands
|
// Lobby commands
|
||||||
|
|
||||||
@@ -2242,6 +2258,7 @@ static const unordered_map<string, ChatCommandDefinition> chat_commands({
|
|||||||
{"$save", {server_command_save, nullptr}},
|
{"$save", {server_command_save, nullptr}},
|
||||||
{"$savechar", {server_command_savechar, nullptr}},
|
{"$savechar", {server_command_savechar, nullptr}},
|
||||||
{"$saverec", {server_command_saverec, nullptr}},
|
{"$saverec", {server_command_saverec, nullptr}},
|
||||||
|
{"$sb", {server_command_send_both, proxy_command_send_both}},
|
||||||
{"$sc", {server_command_send_client, proxy_command_send_client}},
|
{"$sc", {server_command_send_client, proxy_command_send_client}},
|
||||||
{"$secid", {server_command_secid, proxy_command_secid}},
|
{"$secid", {server_command_secid, proxy_command_secid}},
|
||||||
{"$setassist", {server_command_ep3_replace_assist_card, nullptr}},
|
{"$setassist", {server_command_ep3_replace_assist_card, nullptr}},
|
||||||
@@ -2249,7 +2266,7 @@ static const unordered_map<string, ChatCommandDefinition> chat_commands({
|
|||||||
{"$silence", {server_command_silence, nullptr}},
|
{"$silence", {server_command_silence, nullptr}},
|
||||||
{"$song", {server_command_song, proxy_command_song}},
|
{"$song", {server_command_song, proxy_command_song}},
|
||||||
{"$spec", {server_command_toggle_spectator_flag, nullptr}},
|
{"$spec", {server_command_toggle_spectator_flag, nullptr}},
|
||||||
{"$ss", {nullptr, proxy_command_send_server}},
|
{"$ss", {server_command_send_server, proxy_command_send_server}},
|
||||||
{"$stat", {server_command_get_ep3_battle_stat, nullptr}},
|
{"$stat", {server_command_get_ep3_battle_stat, nullptr}},
|
||||||
{"$surrender", {server_command_surrender, nullptr}},
|
{"$surrender", {server_command_surrender, nullptr}},
|
||||||
{"$swa", {server_command_switch_assist, proxy_command_switch_assist}},
|
{"$swa", {server_command_switch_assist, proxy_command_switch_assist}},
|
||||||
|
|||||||
Reference in New Issue
Block a user