comparison mcabber/mcabber/hooks.c @ 2162:9e40d8f5bbe6

When show_status_in_buffer is set, display the resource name in the buffer
author Mikael Berthe <mikael@lilotux.net>
date Sun, 26 Oct 2014 12:56:56 +0100
parents a54c084af4d6
children 038c4d601011
comparison
equal deleted inserted replaced
2161:28ee843ddc02 2162:9e40d8f5bbe6
549 549
550 if (st_in_buf == 2 || 550 if (st_in_buf == 2 ||
551 (st_in_buf == 1 && (status == offline || oldstat == offline))) { 551 (st_in_buf == 1 && (status == offline || oldstat == offline))) {
552 // Write the status change in the buddy's buffer, only if it already exists 552 // Write the status change in the buddy's buffer, only if it already exists
553 if (scr_buddy_buffer_exists(bjid)) { 553 if (scr_buddy_buffer_exists(bjid)) {
554 bn = g_strdup_printf("Buddy status has changed: [%c>%c] %s", 554 bn = g_strdup_printf("Buddy status has changed: [%c>%c] [%s] %s",
555 imstatus2char[oldstat], imstatus2char[status], 555 imstatus2char[oldstat], imstatus2char[status], rn,
556 ((status_msg) ? status_msg : "")); 556 ((status_msg) ? status_msg : ""));
557 scr_write_incoming_message(bjid, bn, timestamp, 557 scr_write_incoming_message(bjid, bn, timestamp,
558 HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0); 558 HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0);
559 g_free(bn); 559 g_free(bn);
560 } 560 }