summaryrefslogtreecommitdiff
path: root/src/cmumble.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmumble.c')
-rw-r--r--src/cmumble.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmumble.c b/src/cmumble.c
index d276c8a..bca92c3 100644
--- a/src/cmumble.c
+++ b/src/cmumble.c
@@ -88,6 +88,7 @@ static void
recv_server_sync(MumbleProto__ServerSync *sync, struct cmumble_context *ctx)
{
ctx->session = sync->session;
+ ctx->user = find_user(ctx, ctx->session);
if (sync->welcome_text)
g_print("Welcome Message: %s\n", sync->welcome_text);
@@ -165,6 +166,9 @@ recv_user_state(MumbleProto__UserState *state, struct cmumble_context *ctx)
user->id = state->user_id;
user->channel = find_channel(ctx, state->channel_id);
+ if (ctx->session == user->session)
+ ctx->user = user;
+
cmumble_audio_create_playback_pipeline(ctx, user);
g_print("receive user: %s\n", user->name);
ctx->users = g_list_prepend(ctx->users, user);