diff options
| author | 2024-01-11 04:43:57 -0600 | |
|---|---|---|
| committer | 2024-01-11 04:43:57 -0600 | |
| commit | 0423190cd2fe476393a535238a61192a0e3f45a2 (patch) | |
| tree | 5a394eade2bc5a72b3b939db9ca563b7ffa2bb70 /src/cmd-launch.c | |
| parent | add launch command (diff) | |
oops forgot to update profile
Diffstat (limited to 'src/cmd-launch.c')
| -rw-r--r-- | src/cmd-launch.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cmd-launch.c b/src/cmd-launch.c index 4c445d5..2d44b44 100644 --- a/src/cmd-launch.c +++ b/src/cmd-launch.c @@ -52,6 +52,18 @@ unsigned cmd_launch2(struct l2_context_node *ctx, char **args) CMD_FATAL0("Failed to load user"); } + if (user->session) { + if ((res = l2_user_session_refresh(user->session)) < 0) { + CMD_FATAL0("Failed to refresh your token."); + } else if (!res) { + CMD_FATAL("Could not refresh your token. Interactive login required. Please run `l2su user login %s`.", username); + } + + if (l2_user_update_profile(user) < 0) { + CMD_FATAL0("Failed to update profile"); + } + } + struct l2_launch launch = { 0 }; if (l2_launch_init(&launch, versionname, inst) < 0) { CMD_FATAL0("Failed to initialize launch context"); |
