aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/game.gd3
-rw-r--r--client/system/cli.gd1
2 files changed, 4 insertions, 0 deletions
diff --git a/client/game.gd b/client/game.gd
index 4cb5e5d0..3061b2a0 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -117,6 +117,9 @@ func handle_packet(p):
follow_camera.target = player_instance.movement_base
follow_camera.reset()
set_join_state(JoinState.JOINED)
+ if Cli.opts.has("join-command"):
+ mp.send_chat(my_player_id, Cli.opts["join-command"])
+ Cli.opts.erase("join-command")
else:
player_instance = Player.new(p.id, p.name, p.position, p.character, p.class, self)
players[p.id] = player_instance
diff --git a/client/system/cli.gd b/client/system/cli.gd
index b6ba8eef..efaa309a 100644
--- a/client/system/cli.gd
+++ b/client/system/cli.gd
@@ -28,6 +28,7 @@ class Option:
static var OPTIONS := [
Option.new("h", "help", Mode.FLAG, "Show help"),
Option.new("s", "setting", Mode.MULTI_OPTION, "Per-launch setting override"),
+ Option.new("c", "join-command", Mode.OPTION, "Message to send right after initial joining"),
Option.new(null, "connect_address", Mode.POSITIONAL, "Connect to a server directly without menu interaction")
]