| 30 |
30 |
| 31 if (conv == NULL) |
31 if (conv == NULL) |
| 32 return; |
32 return; |
| 33 g_return_if_fail(conv->type == PURPLE_CONV_TYPE_IM); |
33 g_return_if_fail(conv->type == PURPLE_CONV_TYPE_IM); |
| 34 |
34 |
| |
35 /* Prevent duplicate notifications for buddies which are multiple times |
| |
36 in the buddy list */ |
| |
37 if (buddy != purple_find_buddy(buddy->account, buddy->name)) |
| |
38 return; |
| |
39 |
| 35 who = purple_buddy_get_alias(buddy); |
40 who = purple_buddy_get_alias(buddy); |
| 36 escaped = g_markup_escape_text(who, -1); |
41 escaped = g_markup_escape_text(who, -1); |
| 37 |
42 |
| 38 g_snprintf(buf, sizeof(buf), message, escaped); |
43 g_snprintf(buf, sizeof(buf), message, escaped); |
| 39 g_free(escaped); |
44 g_free(escaped); |
| 40 |
45 |
| 41 purple_conv_im_write(conv->u.im, NULL, buf, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_ACTIVE_ONLY, time(NULL)); |
46 purple_conv_im_write(conv->u.im, NULL, buf, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_ACTIVE_ONLY | PURPLE_MESSAGE_NO_LINKIFY, time(NULL)); |
| 42 } |
47 } |
| 43 |
48 |
| 44 static void |
49 static void |
| 45 buddy_status_changed_cb(PurpleBuddy *buddy, PurpleStatus *old_status, |
50 buddy_status_changed_cb(PurpleBuddy *buddy, PurpleStatus *old_status, |
| 46 PurpleStatus *status, void *data) |
51 PurpleStatus *status, void *data) |