diff options
Diffstat (limited to 'src/cmd-launch.c')
| -rw-r--r-- | src/cmd-launch.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/cmd-launch.c b/src/cmd-launch.c index 2d44b44..02a4231 100644 --- a/src/cmd-launch.c +++ b/src/cmd-launch.c @@ -12,8 +12,14 @@ unsigned cmd_launch2(struct l2_context_node *ctx, char **args) unsigned ures; int res; - if (*args) { - CMD_FATAL0("sorry launch settings aren't implemented yet"); + bool detach = true; + + for (char **cur = args; *cur; ++cur) { + if (!strcmp(*cur, "--nodetach")) { + detach = false; + } else { + CMD_FATAL(CMD_MSG_UNKNOWN_ARGUMENT, *cur); + } } char *instancename = NULL; @@ -62,6 +68,10 @@ unsigned cmd_launch2(struct l2_context_node *ctx, char **args) if (l2_user_update_profile(user) < 0) { CMD_FATAL0("Failed to update profile"); } + + if (l2_user_save() < 0) { + CMD_FATAL0("Failed to save user"); + } } struct l2_launch launch = { 0 }; @@ -70,6 +80,7 @@ unsigned cmd_launch2(struct l2_context_node *ctx, char **args) } launch.user = user; + launch.detach = detach; if (l2_launch_init_substitutor(&launch) < 0) { CMD_FATAL0("Failed to initialize argument substitutor"); |
