summaryrefslogtreecommitdiff
path: root/src/cmumble.c
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-09-28 19:44:32 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-09-28 19:45:48 +0200
commit2746ba8ed0032ca9361d02b98eeb0dab2e640bfe (patch)
tree5e3dff17a2fed7581f0bb9af8549100541a479ff /src/cmumble.c
parent9bbc3d2996a510e417a1ca19fe21c7c4623d2208 (diff)
downloadcmumble-2746ba8ed0032ca9361d02b98eeb0dab2e640bfe.tar.gz
cmumble-2746ba8ed0032ca9361d02b98eeb0dab2e640bfe.tar.bz2
cmumble-2746ba8ed0032ca9361d02b98eeb0dab2e640bfe.zip
Store own user in cmumble_context
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);