comparison mcabber/src/hooks.c @ 830:80434fde7cfa

Display presence notification timestamps when they exist These timestamps were used in the roster, but not in the buffer window message nor in the history logfile. Reported by "ze".
author Mikael Berthe <mikael@lilotux.net>
date Wed, 03 May 2006 11:28:41 +0200
parents 4a6ce276ffca
children 722f186f51c3
comparison
equal deleted inserted replaced
829:114f08e3c29a 830:80434fde7cfa
238 // Write the status change in the buddy's buffer, only if it already exists 238 // Write the status change in the buddy's buffer, only if it already exists
239 if (scr_BuddyBufferExists(jid)) { 239 if (scr_BuddyBufferExists(jid)) {
240 bn = g_strdup_printf("Buddy status has changed: [%c>%c] %s", 240 bn = g_strdup_printf("Buddy status has changed: [%c>%c] %s",
241 imstatus2char[oldstat], imstatus2char[status], 241 imstatus2char[oldstat], imstatus2char[status],
242 ((status_msg) ? status_msg : "")); 242 ((status_msg) ? status_msg : ""));
243 scr_WriteIncomingMessage(jid, bn, 0, HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG); 243 scr_WriteIncomingMessage(jid, bn, timestamp,
244 HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG);
244 g_free(bn); 245 g_free(bn);
245 } 246 }
246 } 247 }
247 248
248 roster_setstatus(jid, rn, prio, status, status_msg, timestamp, 249 roster_setstatus(jid, rn, prio, status, status_msg, timestamp,
249 role_none, affil_none, NULL); 250 role_none, affil_none, NULL);
250 buddylist_build(); 251 buddylist_build();
251 scr_DrawRoster(); 252 scr_DrawRoster();
252 hlog_write_status(jid, 0, status, status_msg); 253 hlog_write_status(jid, timestamp, status, status_msg);
253 // External command 254 // External command
254 hk_ext_cmd(jid, 'S', imstatus2char[status], NULL); 255 hk_ext_cmd(jid, 'S', imstatus2char[status], NULL);
255 } 256 }
256 257
257 inline void hk_mystatuschange(time_t timestamp, enum imstatus old_status, 258 inline void hk_mystatuschange(time_t timestamp, enum imstatus old_status,