Mercurial > ~mikael > mcabber > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
842:f74c5c6d2c24 | 843:915a7f17474a |
---|---|
1082 if (esub & sub_pending) | 1082 if (esub & sub_pending) |
1083 strcat(buffer, " (pending)"); | 1083 strcat(buffer, " (pending)"); |
1084 scr_WriteIncomingMessage(jid, buffer, 0, HBB_PREFIX_INFO); | 1084 scr_WriteIncomingMessage(jid, buffer, 0, HBB_PREFIX_INFO); |
1085 | 1085 |
1086 resources = buddy_getresources(bud); | 1086 resources = buddy_getresources(bud); |
1087 if (!resources && type == ROSTER_TYPE_USER) { | |
1088 // No resource; display last status message, if any. | |
1089 const char *rst_msg = buddy_getstatusmsg(bud, ""); | |
1090 if (rst_msg) { | |
1091 snprintf(buffer, 4095, "Last status message: %s", rst_msg); | |
1092 scr_WriteIncomingMessage(jid, buffer, 0, HBB_PREFIX_INFO); | |
1093 } | |
1094 } | |
1087 for ( ; resources ; resources = g_slist_next(resources) ) { | 1095 for ( ; resources ; resources = g_slist_next(resources) ) { |
1088 gchar rprio; | 1096 gchar rprio; |
1089 enum imstatus rstatus; | 1097 enum imstatus rstatus; |
1090 const char *rst_msg; | 1098 const char *rst_msg; |
1091 time_t rst_time; | 1099 time_t rst_time; |