Mercurial > hg
comparison mcabber/src/jabglue.c @ 845:51829325fe21
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.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 07 May 2006 15:40:09 +0200 |
parents | f74c5c6d2c24 |
children | cb2a3a1d985f |
comparison
equal
deleted
inserted
replaced
844:5002948c7360 | 845:51829325fe21 |
---|---|
1107 } | 1107 } |
1108 } else { | 1108 } else { |
1109 mbuf = g_strdup_printf("You have left %s", roomjid); | 1109 mbuf = g_strdup_printf("You have left %s", roomjid); |
1110 } | 1110 } |
1111 } else { | 1111 } else { |
1112 if (ustmsg) | 1112 if (ust != offline) { |
1113 mbuf = g_strdup_printf("%s has left: %s", rname, ustmsg); | 1113 // This can happen when a network failure occurs, |
1114 else | 1114 // this isn't an official leave but the user isn't there anymore. |
1115 mbuf = g_strdup_printf("%s has left", rname); | 1115 mbuf = g_strdup_printf("%s has disappeared!", rname); |
1116 ust = offline; | |
1117 } else { | |
1118 if (ustmsg) | |
1119 mbuf = g_strdup_printf("%s has left: %s", rname, ustmsg); | |
1120 else | |
1121 mbuf = g_strdup_printf("%s has left", rname); | |
1122 } | |
1116 } | 1123 } |
1117 } | 1124 } |
1118 | 1125 |
1119 scr_WriteIncomingMessage(roomjid, mbuf, usttime, | 1126 scr_WriteIncomingMessage(roomjid, mbuf, usttime, |
1120 HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG); | 1127 HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG); |