Mercurial > hg
diff mcabber/src/commands.c @ 843:915a7f17474a
Remember the status message when a buddy goes offline
This is useful when people use a status message when leaving,
or with some Jabber transports.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 06 May 2006 12:59:04 +0200 |
parents | f8c0447beec2 |
children | 5002948c7360 |
line wrap: on
line diff
--- a/mcabber/src/commands.c Sat May 06 00:00:46 2006 +0200 +++ b/mcabber/src/commands.c Sat May 06 12:59:04 2006 +0200 @@ -1084,6 +1084,14 @@ scr_WriteIncomingMessage(jid, buffer, 0, HBB_PREFIX_INFO); resources = buddy_getresources(bud); + if (!resources && type == ROSTER_TYPE_USER) { + // No resource; display last status message, if any. + const char *rst_msg = buddy_getstatusmsg(bud, ""); + if (rst_msg) { + snprintf(buffer, 4095, "Last status message: %s", rst_msg); + scr_WriteIncomingMessage(jid, buffer, 0, HBB_PREFIX_INFO); + } + } for ( ; resources ; resources = g_slist_next(resources) ) { gchar rprio; enum imstatus rstatus;