# HG changeset patch # User Mikael Berthe # Date 1147009209 -7200 # Node ID 51829325fe21dcd372f7d0fce5b68099b573a35e # Parent 5002948c7360b8a4ae1fc0b1c057d05121186668 MUC: Fix a strange bug when a user isn't in a room anymore (network issue) When the Jabber server cannot reach a server anymore, it considers the users of this server have left, but doesn't send type=unavailable. Mcabber didn't understand and still believed the users were in the room. This patch should fix that. diff -r 5002948c7360 -r 51829325fe21 mcabber/src/jabglue.c --- a/mcabber/src/jabglue.c Sat May 06 18:41:24 2006 +0200 +++ b/mcabber/src/jabglue.c Sun May 07 15:40:09 2006 +0200 @@ -1109,10 +1109,17 @@ mbuf = g_strdup_printf("You have left %s", roomjid); } } else { - if (ustmsg) - mbuf = g_strdup_printf("%s has left: %s", rname, ustmsg); - else - mbuf = g_strdup_printf("%s has left", rname); + if (ust != offline) { + // This can happen when a network failure occurs, + // this isn't an official leave but the user isn't there anymore. + mbuf = g_strdup_printf("%s has disappeared!", rname); + ust = offline; + } else { + if (ustmsg) + mbuf = g_strdup_printf("%s has left: %s", rname, ustmsg); + else + mbuf = g_strdup_printf("%s has left", rname); + } } }