| 309 } |
309 } |
| 310 |
310 |
| 311 static void |
311 static void |
| 312 account_signed_on_off(PurpleConnection *gc, gpointer null) |
312 account_signed_on_off(PurpleConnection *gc, gpointer null) |
| 313 { |
313 { |
| 314 GList *ims = purple_get_ims(); |
314 GList *list = purple_get_ims(); |
| 315 while (ims) { |
315 while (list) { |
| 316 PurpleConversation *conv = ims->data; |
316 PurpleConversation *conv = list->data; |
| 317 PurpleConversation *cc = find_conv_with_contact(conv->account, conv->name); |
317 PurpleConversation *cc = find_conv_with_contact(conv->account, conv->name); |
| 318 if (cc) |
318 if (cc) |
| 319 generate_send_to_menu(cc->ui_data); |
319 generate_send_to_menu(cc->ui_data); |
| 320 ims = ims->next; |
320 list = list->next; |
| |
321 } |
| |
322 |
| |
323 if (PURPLE_CONNECTION_IS_CONNECTED(gc)) { |
| |
324 /* We just signed on. Let's see if there's any chat that we have open, |
| |
325 * and hadn't left before the disconnect. */ |
| |
326 list = purple_get_chats(); |
| |
327 while (list) { |
| |
328 PurpleConversation *conv = list->data; |
| |
329 PurpleChat *chat; |
| |
330 GHashTable *comps = NULL; |
| |
331 |
| |
332 list = list->next; |
| |
333 if (conv->account != gc->account || |
| |
334 !purple_conversation_get_data(conv, "want-to-rejoin")) |
| |
335 continue; |
| |
336 |
| |
337 chat = purple_blist_find_chat(conv->account, conv->name); |
| |
338 if (chat == NULL) { |
| |
339 if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults != NULL) |
| |
340 comps = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, conv->name); |
| |
341 } else { |
| |
342 comps = chat->components; |
| |
343 } |
| |
344 serv_join_chat(gc, comps); |
| |
345 if (chat == NULL && comps != NULL) |
| |
346 g_hash_table_destroy(comps); |
| |
347 } |
| 321 } |
348 } |
| 322 } |
349 } |
| 323 |
350 |
| 324 static gpointer |
351 static gpointer |
| 325 finch_conv_get_handle() |
352 finch_conv_get_handle() |
| 736 |
763 |
| 737 if (flags & PURPLE_MESSAGE_AUTO_RESP) |
764 if (flags & PURPLE_MESSAGE_AUTO_RESP) |
| 738 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), |
765 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), |
| 739 _("<AUTO-REPLY> "), GNT_TEXT_FLAG_BOLD); |
766 _("<AUTO-REPLY> "), GNT_TEXT_FLAG_BOLD); |
| 740 |
767 |
| 741 if (who && *who && (flags & (PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_RECV))) |
768 if (who && *who && (flags & (PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_RECV)) && |
| |
769 !(flags & PURPLE_MESSAGE_NOTIFY)) |
| 742 { |
770 { |
| 743 char * name = NULL; |
771 char * name = NULL; |
| 744 |
772 |
| 745 if (purple_message_meify((char*)message, -1)) |
773 if (purple_message_meify((char*)message, -1)) |
| 746 name = g_strdup_printf("*** %s ", who); |
774 name = g_strdup_printf("*** %s ", who); |