comparison src/server.c @ 11338:17142948653e

[gaim-migrate @ 13551] Change the GAIM_CONV_IM and GAIM_CONV_CHAT enums to GAIM_CONV_TYPE_IM and GAIM_CONV_TYPE_CHAT. This touched A LOT of files. Also combined two oscar header files (one of them was small and dorky). committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 25 Aug 2005 02:33:44 +0000
parents 90be432e8385
children 7fbf5e4e8f5f
comparison
equal deleted inserted replaced
11337:1462b64f8fc9 11338:17142948653e
145 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); 145 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
146 146
147 account = gaim_connection_get_account(gc); 147 account = gaim_connection_get_account(gc);
148 presence = gaim_account_get_presence(account); 148 presence = gaim_account_get_presence(account);
149 149
150 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, name, gc->account); 150 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account);
151 151
152 if (prpl_info && prpl_info->send_im) 152 if (prpl_info && prpl_info->send_im)
153 val = prpl_info->send_im(gc, name, message, imflags); 153 val = prpl_info->send_im(gc, name, message, imflags);
154 154
155 if (!(imflags & GAIM_CONV_IM_AUTO_RESP)) 155 if (!(imflags & GAIM_CONV_IM_AUTO_RESP))
341 for (buds = buddies; buds; buds = buds->next) 341 for (buds = buddies; buds; buds = buds->next)
342 { 342 {
343 b = buds->data; 343 b = buds->data;
344 gaim_blist_server_alias_buddy(b, alias); 344 gaim_blist_server_alias_buddy(b, alias);
345 345
346 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, b->name, account); 346 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, b->name, account);
347 347
348 if (conv != NULL && b->server_alias != NULL && 348 if (conv != NULL && b->server_alias != NULL &&
349 strcmp(b->server_alias, alias)) 349 strcmp(b->server_alias, alias))
350 { 350 {
351 char *tmp = g_strdup_printf(_("%s is now known as %s.\n"), 351 char *tmp = g_strdup_printf(_("%s is now known as %s.\n"),
626 626
627 /* 627 /*
628 * We should update the conversation window buttons and menu, 628 * We should update the conversation window buttons and menu,
629 * if it exists. 629 * if it exists.
630 */ 630 */
631 cnv = gaim_find_conversation_with_account(GAIM_CONV_IM, who, gc->account); 631 cnv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, gc->account);
632 632
633 /* 633 /*
634 * Plugin stuff. we pass a char ** but we don't want to pass what's 634 * Plugin stuff. we pass a char ** but we don't want to pass what's
635 * been given us by the prpls. So we create temp holders and pass 635 * been given us by the prpls. So we create temp holders and pass
636 * those instead. It's basically just to avoid segfaults. 636 * those instead. It's basically just to avoid segfaults.
756 * exists and is updated (partly handled above already), play 756 * exists and is updated (partly handled above already), play
757 * the receive sound (sound.c will take care of not playing 757 * the receive sound (sound.c will take care of not playing
758 * while away), and then write it to the convo window. 758 * while away), and then write it to the convo window.
759 */ 759 */
760 if (cnv == NULL) 760 if (cnv == NULL)
761 cnv = gaim_conversation_new(GAIM_CONV_IM, account, name); 761 cnv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, name);
762 762
763 gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, message, msgflags, mtime); 763 gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, message, msgflags, mtime);
764 } 764 }
765 765
766 /* 766 /*
859 */ 859 */
860 /* XXX CORE/UI */ 860 /* XXX CORE/UI */
861 #if 0 861 #if 0
862 if (docklet_count && 862 if (docklet_count &&
863 gaim_prefs_get_bool("/plugins/gtk/docklet/queue_messages") && 863 gaim_prefs_get_bool("/plugins/gtk/docklet/queue_messages") &&
864 !gaim_find_conversation_with_account(GAIM_CONV_IM, name, gc->account)) { 864 !gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account)) {
865 /* 865 /*
866 * We're gonna queue it up and wait for the user to ask for 866 * We're gonna queue it up and wait for the user to ask for
867 * it... probably by clicking the docklet or windows tray icon. 867 * it... probably by clicking the docklet or windows tray icon.
868 */ 868 */
869 struct queued_message *qm; 869 struct queued_message *qm;
876 unread_message_queue = g_slist_append(unread_message_queue, qm); 876 unread_message_queue = g_slist_append(unread_message_queue, qm);
877 } 877 }
878 else { 878 else {
879 #endif 879 #endif
880 if (cnv == NULL) 880 if (cnv == NULL)
881 cnv = gaim_conversation_new(GAIM_CONV_IM, gc->account, name); 881 cnv = gaim_conversation_new(GAIM_CONV_TYPE_IM, gc->account, name);
882 882
883 gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, message, msgflags, mtime); 883 gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, message, msgflags, mtime);
884 #if 0 884 #if 0
885 } 885 }
886 #endif 886 #endif
895 895
896 GaimBuddy *b; 896 GaimBuddy *b;
897 GaimConversation *cnv; 897 GaimConversation *cnv;
898 GaimConvIm *im; 898 GaimConvIm *im;
899 899
900 cnv = gaim_find_conversation_with_account(GAIM_CONV_IM, name, gc->account); 900 cnv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account);
901 if (!cnv) 901 if (!cnv)
902 return; 902 return;
903 903
904 im = GAIM_CONV_IM(cnv); 904 im = GAIM_CONV_IM(cnv);
905 905
931 931
932 GaimConversation *c; 932 GaimConversation *c;
933 GaimConvIm *im; 933 GaimConvIm *im;
934 GaimBuddy *b; 934 GaimBuddy *b;
935 935
936 c = gaim_find_conversation_with_account(GAIM_CONV_IM, name, gc->account); 936 c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account);
937 if (!c) 937 if (!c)
938 return; 938 return;
939 939
940 im = GAIM_CONV_IM(c); 940 im = GAIM_CONV_IM(c);
941 941
1032 GaimConvChat *chat; 1032 GaimConvChat *chat;
1033 GaimAccount *account; 1033 GaimAccount *account;
1034 1034
1035 account = gaim_connection_get_account(gc); 1035 account = gaim_connection_get_account(gc);
1036 1036
1037 conv = gaim_conversation_new(GAIM_CONV_CHAT, account, name); 1037 conv = gaim_conversation_new(GAIM_CONV_TYPE_CHAT, account, name);
1038 chat = GAIM_CONV_CHAT(conv); 1038 chat = GAIM_CONV_CHAT(conv);
1039 1039
1040 if (!g_slist_find(gc->buddy_chats, conv)) 1040 if (!g_slist_find(gc->buddy_chats, conv))
1041 gc->buddy_chats = g_slist_append(gc->buddy_chats, conv); 1041 gc->buddy_chats = g_slist_append(gc->buddy_chats, conv);
1042 1042