finch/gntconv.c

branch
soc.2013.gobjectification
changeset 34622
753f46dd000f
parent 34589
428e92c79631
child 34625
03d62b1660fc
equal deleted inserted replaced
34621:66308be62d23 34622:753f46dd000f
113 { 113 {
114 const char *text = gnt_entry_get_text(GNT_ENTRY(ggconv->entry)); 114 const char *text = gnt_entry_get_text(GNT_ENTRY(ggconv->entry));
115 gboolean empty = (!text || !*text || (*text == '/')); 115 gboolean empty = (!text || !*text || (*text == '/'));
116 if (purple_prefs_get_bool("/finch/conversations/notify_typing")) { 116 if (purple_prefs_get_bool("/finch/conversations/notify_typing")) {
117 PurpleConversation *conv = ggconv->active_conv; 117 PurpleConversation *conv = ggconv->active_conv;
118 PurpleConvIm *im = PURPLE_CONV_IM(conv); 118 PurpleIMConversation *im = PURPLE_CONV_IM(conv);
119 if (!empty) { 119 if (!empty) {
120 gboolean send = (purple_conv_im_get_send_typed_timeout(im) == 0); 120 gboolean send = (purple_im_conversation_get_send_typed_timeout(im) == 0);
121 121
122 purple_conv_im_stop_send_typed_timeout(im); 122 purple_im_conversation_stop_send_typed_timeout(im);
123 purple_conv_im_start_send_typed_timeout(im); 123 purple_im_conversation_start_send_typed_timeout(im);
124 if (send || (purple_conv_im_get_type_again(im) != 0 && 124 if (send || (purple_im_conversation_get_type_again(im) != 0 &&
125 time(NULL) > purple_conv_im_get_type_again(im))) { 125 time(NULL) > purple_im_conversation_get_type_again(im))) {
126 unsigned int timeout; 126 unsigned int timeout;
127 timeout = serv_send_typing(purple_conversation_get_connection(conv), 127 timeout = serv_send_typing(purple_conversation_get_connection(conv),
128 purple_conversation_get_name(conv), 128 purple_conversation_get_name(conv),
129 PURPLE_TYPING); 129 PURPLE_IM_CONVERSATION_TYPING);
130 purple_conv_im_set_type_again(im, timeout); 130 purple_im_conversation_set_type_again(im, timeout);
131 } 131 }
132 } else { 132 } else {
133 purple_conv_im_stop_send_typed_timeout(im); 133 purple_im_conversation_stop_send_typed_timeout(im);
134 134
135 serv_send_typing(purple_conversation_get_connection(conv), 135 serv_send_typing(purple_conversation_get_connection(conv),
136 purple_conversation_get_name(conv), 136 purple_conversation_get_name(conv),
137 PURPLE_NOT_TYPING); 137 PURPLE_IM_CONVERSATION_NOT_TYPING);
138 } 138 }
139 } 139 }
140 } 140 }
141 141
142 static void 142 static void
195 { 195 {
196 char *escape = purple_markup_escape_text((*text == '/' ? text + 1 : text), -1); 196 char *escape = purple_markup_escape_text((*text == '/' ? text + 1 : text), -1);
197 switch (purple_conversation_get_type(ggconv->active_conv)) 197 switch (purple_conversation_get_type(ggconv->active_conv))
198 { 198 {
199 case PURPLE_CONV_TYPE_IM: 199 case PURPLE_CONV_TYPE_IM:
200 purple_conv_im_send_with_flags(PURPLE_CONV_IM(ggconv->active_conv), escape, PURPLE_MESSAGE_SEND); 200 purple_im_conversation_send_message(PURPLE_CONV_IM(ggconv->active_conv), escape, PURPLE_MESSAGE_SEND);
201 break; 201 break;
202 case PURPLE_CONV_TYPE_CHAT: 202 case PURPLE_CONV_TYPE_CHAT:
203 purple_conv_chat_send(PURPLE_CONV_CHAT(ggconv->active_conv), escape); 203 purple_chat_conversation_send(PURPLE_CONV_CHAT(ggconv->active_conv), escape);
204 break; 204 break;
205 default: 205 default:
206 g_free(escape); 206 g_free(escape);
207 g_return_if_reached(); 207 g_return_if_reached();
208 } 208 }
253 253
254 for (node = purple_blist_node_get_first_child(purple_blist_node_get_parent((PurpleBlistNode*)buddy)); 254 for (node = purple_blist_node_get_first_child(purple_blist_node_get_parent((PurpleBlistNode*)buddy));
255 node; node = purple_blist_node_get_sibling_next(node)) { 255 node; node = purple_blist_node_get_sibling_next(node)) {
256 if (node == (PurpleBlistNode*)buddy) 256 if (node == (PurpleBlistNode*)buddy)
257 continue; 257 continue;
258 if ((ret = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, 258 if ((ret = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM,
259 purple_buddy_get_name((PurpleBuddy*)node), purple_buddy_get_account((PurpleBuddy*)node))) != NULL) 259 purple_buddy_get_name((PurpleBuddy*)node), purple_buddy_get_account((PurpleBuddy*)node))) != NULL)
260 break; 260 break;
261 } 261 }
262 return ret; 262 return ret;
263 } 263 }
272 static void 272 static void
273 update_buddy_typing(PurpleAccount *account, const char *who, gpointer null) 273 update_buddy_typing(PurpleAccount *account, const char *who, gpointer null)
274 { 274 {
275 PurpleConversation *conv; 275 PurpleConversation *conv;
276 FinchConv *ggc; 276 FinchConv *ggc;
277 PurpleConvIm *im = NULL; 277 PurpleIMConversation *im = NULL;
278 char *title, *str; 278 char *title, *str;
279 279
280 conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, who, account); 280 conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, who, account);
281 281
282 if (!conv) 282 if (!conv)
283 return; 283 return;
284 284
285 im = PURPLE_CONV_IM(conv); 285 im = PURPLE_CONV_IM(conv);
286 ggc = FINCH_CONV(conv); 286 ggc = FINCH_CONV(conv);
287 287
288 if (purple_conv_im_get_typing_state(im) == PURPLE_TYPING) { 288 if (purple_im_conversation_get_typing_state(im) == PURPLE_IM_CONVERSATION_TYPING) {
289 int scroll; 289 int scroll;
290 str = get_conversation_title(conv, account); 290 str = get_conversation_title(conv, account);
291 title = g_strdup_printf(_("%s [%s]"), str, 291 title = g_strdup_printf(_("%s [%s]"), str,
292 gnt_ascii_only() ? "T" : "\342\243\277"); 292 gnt_ascii_only() ? "T" : "\342\243\277");
293 g_free(str); 293 g_free(str);
326 } 326 }
327 327
328 static void 328 static void
329 account_signed_on_off(PurpleConnection *gc, gpointer null) 329 account_signed_on_off(PurpleConnection *gc, gpointer null)
330 { 330 {
331 GList *list = purple_get_ims(); 331 GList *list = purple_conversations_get_ims();
332 while (list) { 332 while (list) {
333 PurpleConversation *conv = list->data; 333 PurpleConversation *conv = list->data;
334 PurpleConversation *cc = find_conv_with_contact( 334 PurpleConversation *cc = find_conv_with_contact(
335 purple_conversation_get_account(conv), purple_conversation_get_name(conv)); 335 purple_conversation_get_account(conv), purple_conversation_get_name(conv));
336 if (cc) 336 if (cc)
339 } 339 }
340 340
341 if (PURPLE_CONNECTION_IS_CONNECTED(gc)) { 341 if (PURPLE_CONNECTION_IS_CONNECTED(gc)) {
342 /* We just signed on. Let's see if there's any chat that we have open, 342 /* We just signed on. Let's see if there's any chat that we have open,
343 * and hadn't left before the disconnect. */ 343 * and hadn't left before the disconnect. */
344 list = purple_get_chats(); 344 list = purple_conversations_get_chats();
345 while (list) { 345 while (list) {
346 PurpleConversation *conv = list->data; 346 PurpleConversation *conv = list->data;
347 PurpleChat *chat; 347 PurpleChat *chat;
348 GHashTable *comps = NULL; 348 GHashTable *comps = NULL;
349 349
368 } 368 }
369 369
370 static void 370 static void
371 account_signing_off(PurpleConnection *gc) 371 account_signing_off(PurpleConnection *gc)
372 { 372 {
373 GList *list = purple_get_chats(); 373 GList *list = purple_conversations_get_chats();
374 PurpleAccount *account = purple_connection_get_account(gc); 374 PurpleAccount *account = purple_connection_get_account(gc);
375 375
376 /* We are about to sign off. See which chats we are currently in, and mark 376 /* We are about to sign off. See which chats we are currently in, and mark
377 * them for rejoin on reconnect. */ 377 * them for rejoin on reconnect. */
378 while (list) { 378 while (list) {
379 PurpleConversation *conv = list->data; 379 PurpleConversation *conv = list->data;
380 if (!purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv)) && 380 if (!purple_chat_conversation_has_left(PURPLE_CONV_CHAT(conv)) &&
381 purple_conversation_get_account(conv) == account) { 381 purple_conversation_get_account(conv) == account) {
382 purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE)); 382 purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE));
383 purple_conversation_write(conv, NULL, _("The account has disconnected and you are no " 383 purple_conversation_write(conv, NULL, _("The account has disconnected and you are no "
384 "longer in this chat. You will be automatically rejoined in the chat when " 384 "longer in this chat. You will be automatically rejoined in the chat when "
385 "the account reconnects."), 385 "the account reconnects."),
419 gnt_append_menu_action(GNT_MENU(sub), list->data, ggc->active_conv); 419 gnt_append_menu_action(GNT_MENU(sub), list->data, ggc->active_conv);
420 } 420 }
421 } 421 }
422 422
423 static void 423 static void
424 conv_updated(PurpleConversation *conv, PurpleConvUpdateType type) 424 conv_updated(PurpleConversation *conv, PurpleConversationUpdateType type)
425 { 425 {
426 if (type == PURPLE_CONV_UPDATE_FEATURES) { 426 if (type == PURPLE_CONVERSATION_UPDATE_FEATURES) {
427 gg_extended_menu(purple_conversation_get_ui_data(conv)); 427 gg_extended_menu(purple_conversation_get_ui_data(conv));
428 } 428 }
429 } 429 }
430 430
431 static void 431 static void
614 static void 614 static void
615 invite_cb(GntMenuItem *item, gpointer ggconv) 615 invite_cb(GntMenuItem *item, gpointer ggconv)
616 { 616 {
617 FinchConv *fc = ggconv; 617 FinchConv *fc = ggconv;
618 PurpleConversation *conv = fc->active_conv; 618 PurpleConversation *conv = fc->active_conv;
619 purple_conv_chat_invite_user(PURPLE_CONV_CHAT(conv), NULL, NULL, TRUE); 619 purple_chat_conversation_invite_user(PURPLE_CONV_CHAT(conv), NULL, NULL, TRUE);
620 } 620 }
621 621
622 static void 622 static void
623 plugin_changed_cb(PurplePlugin *p, gpointer data) 623 plugin_changed_cb(PurplePlugin *p, gpointer data)
624 { 624 {
720 720
721 name = gnt_tree_get_selection_data(GNT_TREE(widget)); 721 name = gnt_tree_get_selection_data(GNT_TREE(widget));
722 722
723 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc)); 723 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
724 if (prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_cb_real_name)) 724 if (prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_cb_real_name))
725 realname = prpl_info->get_cb_real_name(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(fc->active_conv)), name); 725 realname = prpl_info->get_cb_real_name(gc, purple_chat_conversation_get_id(PURPLE_CONV_CHAT(fc->active_conv)), name);
726 else 726 else
727 realname = NULL; 727 realname = NULL;
728 purple_conversation_new(PURPLE_CONV_TYPE_IM, account, realname ? realname : name); 728 purple_conversation_new(PURPLE_CONV_TYPE_IM, account, realname ? realname : name);
729 g_free(realname); 729 g_free(realname);
730 } 730 }
733 gained_focus_cb(GntWindow *window, FinchConv *fc) 733 gained_focus_cb(GntWindow *window, FinchConv *fc)
734 { 734 {
735 GList *iter; 735 GList *iter;
736 for (iter = fc->list; iter; iter = iter->next) { 736 for (iter = fc->list; iter; iter = iter->next) {
737 purple_conversation_set_data(iter->data, "unseen-count", 0); 737 purple_conversation_set_data(iter->data, "unseen-count", 0);
738 purple_conversation_update(iter->data, PURPLE_CONV_UPDATE_UNSEEN); 738 purple_conversation_update(iter->data, PURPLE_CONVERSATION_UPDATE_UNSEEN);
739 } 739 }
740 } 740 }
741 741
742 static void 742 static void
743 completion_cb(GntEntry *entry, const char *start, const char *end) 743 completion_cb(GntEntry *entry, const char *start, const char *end)
1026 1026
1027 g_free(newline); 1027 g_free(newline);
1028 g_free(strip); 1028 g_free(strip);
1029 1029
1030 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM && 1030 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM &&
1031 purple_conv_im_get_typing_state(PURPLE_CONV_IM(conv)) == PURPLE_TYPING) { 1031 purple_im_conversation_get_typing_state(PURPLE_CONV_IM(conv)) == PURPLE_IM_CONVERSATION_TYPING) {
1032 strip = g_strdup_printf(_("\n%s is typing..."), purple_conversation_get_title(conv)); 1032 strip = g_strdup_printf(_("\n%s is typing..."), purple_conversation_get_title(conv));
1033 gnt_text_view_append_text_with_tag(GNT_TEXT_VIEW(ggconv->tv), 1033 gnt_text_view_append_text_with_tag(GNT_TEXT_VIEW(ggconv->tv),
1034 strip, GNT_TEXT_FLAG_DIM, "typing"); 1034 strip, GNT_TEXT_FLAG_DIM, "typing");
1035 g_free(strip); 1035 g_free(strip);
1036 } 1036 }
1041 if (flags & (PURPLE_MESSAGE_RECV | PURPLE_MESSAGE_NICK | PURPLE_MESSAGE_ERROR)) 1041 if (flags & (PURPLE_MESSAGE_RECV | PURPLE_MESSAGE_NICK | PURPLE_MESSAGE_ERROR))
1042 gnt_widget_set_urgent(ggconv->tv); 1042 gnt_widget_set_urgent(ggconv->tv);
1043 if (flags & PURPLE_MESSAGE_RECV && !gnt_widget_has_focus(ggconv->window)) { 1043 if (flags & PURPLE_MESSAGE_RECV && !gnt_widget_has_focus(ggconv->window)) {
1044 int count = GPOINTER_TO_INT(purple_conversation_get_data(conv, "unseen-count")); 1044 int count = GPOINTER_TO_INT(purple_conversation_get_data(conv, "unseen-count"));
1045 purple_conversation_set_data(conv, "unseen-count", GINT_TO_POINTER(count + 1)); 1045 purple_conversation_set_data(conv, "unseen-count", GINT_TO_POINTER(count + 1));
1046 purple_conversation_update(conv, PURPLE_CONV_UPDATE_UNSEEN); 1046 purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_UNSEEN);
1047 } 1047 }
1048 } 1048 }
1049 1049
1050 static void 1050 static void
1051 finch_write_chat(PurpleConversation *conv, const char *who, const char *message, 1051 finch_write_chat(PurpleConversation *conv, const char *who, const char *message,
1093 1093
1094 finch_write_common(conv, name, message, flags, mtime); 1094 finch_write_common(conv, name, message, flags, mtime);
1095 } 1095 }
1096 1096
1097 static const char * 1097 static const char *
1098 chat_flag_text(PurpleConvChatBuddyFlags flags) 1098 chat_flag_text(PurpleChatConversationBuddyFlags flags)
1099 { 1099 {
1100 if (flags & PURPLE_CBFLAGS_FOUNDER) 1100 if (flags & PURPLE_CHAT_CONVERSATION_BUDDY_FOUNDER)
1101 return "~"; 1101 return "~";
1102 if (flags & PURPLE_CBFLAGS_OP) 1102 if (flags & PURPLE_CHAT_CONVERSATION_BUDDY_OP)
1103 return "@"; 1103 return "@";
1104 if (flags & PURPLE_CBFLAGS_HALFOP) 1104 if (flags & PURPLE_CHAT_CONVERSATION_BUDDY_HALFOP)
1105 return "%"; 1105 return "%";
1106 if (flags & PURPLE_CBFLAGS_VOICE) 1106 if (flags & PURPLE_CHAT_CONVERSATION_BUDDY_VOICE)
1107 return "+"; 1107 return "+";
1108 return " "; 1108 return " ";
1109 } 1109 }
1110 1110
1111 static void 1111 static void
1123 1123
1124 g_string_printf(string, 1124 g_string_printf(string,
1125 ngettext("List of %d user:\n", "List of %d users:\n", count), count); 1125 ngettext("List of %d user:\n", "List of %d users:\n", count), count);
1126 for (iter = users; iter; iter = iter->next) 1126 for (iter = users; iter; iter = iter->next)
1127 { 1127 {
1128 PurpleConvChatBuddy *cbuddy = iter->data; 1128 PurpleChatConversationBuddy *cbuddy = iter->data;
1129 const char *str; 1129 const char *str;
1130 1130
1131 if ((str = purple_conv_chat_cb_get_alias(cbuddy)) == NULL) 1131 if ((str = purple_chat_conversation_cb_get_alias(cbuddy)) == NULL)
1132 str = purple_conv_chat_cb_get_name(cbuddy); 1132 str = purple_chat_conversation_cb_get_name(cbuddy);
1133 g_string_append_printf(string, "[ %s ]", str); 1133 g_string_append_printf(string, "[ %s ]", str);
1134 } 1134 }
1135 1135
1136 purple_conversation_write(conv, NULL, string->str, 1136 purple_conversation_write(conv, NULL, string->str,
1137 PURPLE_MESSAGE_SYSTEM, time(NULL)); 1137 PURPLE_MESSAGE_SYSTEM, time(NULL));
1138 g_string_free(string, TRUE); 1138 g_string_free(string, TRUE);
1139 } 1139 }
1140 1140
1141 for (; users; users = users->next) 1141 for (; users; users = users->next)
1142 { 1142 {
1143 PurpleConvChatBuddy *cbuddy = users->data; 1143 PurpleChatConversationBuddy *cbuddy = users->data;
1144 GntTree *tree = GNT_TREE(ggc->u.chat->userlist); 1144 GntTree *tree = GNT_TREE(ggc->u.chat->userlist);
1145 gnt_entry_add_suggest(entry, purple_conv_chat_cb_get_name(cbuddy)); 1145 gnt_entry_add_suggest(entry, purple_chat_conversation_cb_get_name(cbuddy));
1146 gnt_entry_add_suggest(entry, purple_conv_chat_cb_get_alias(cbuddy)); 1146 gnt_entry_add_suggest(entry, purple_chat_conversation_cb_get_alias(cbuddy));
1147 gnt_tree_add_row_after(tree, g_strdup(purple_conv_chat_cb_get_name(cbuddy)), 1147 gnt_tree_add_row_after(tree, g_strdup(purple_chat_conversation_cb_get_name(cbuddy)),
1148 gnt_tree_create_row(tree, chat_flag_text(purple_conv_chat_cb_get_flags(cbuddy)), purple_conv_chat_cb_get_alias(cbuddy)), NULL, NULL); 1148 gnt_tree_create_row(tree, chat_flag_text(purple_chat_conversation_cb_get_flags(cbuddy)), purple_chat_conversation_cb_get_alias(cbuddy)), NULL, NULL);
1149 } 1149 }
1150 } 1150 }
1151 1151
1152 static void 1152 static void
1153 finch_chat_rename_user(PurpleConversation *conv, const char *old, const char *new_n, const char *new_a) 1153 finch_chat_rename_user(PurpleConversation *conv, const char *old, const char *new_n, const char *new_a)
1154 { 1154 {
1155 /* Update the name for string completion */ 1155 /* Update the name for string completion */
1156 FinchConv *ggc = FINCH_CONV(conv); 1156 FinchConv *ggc = FINCH_CONV(conv);
1157 GntEntry *entry = GNT_ENTRY(ggc->entry); 1157 GntEntry *entry = GNT_ENTRY(ggc->entry);
1158 GntTree *tree = GNT_TREE(ggc->u.chat->userlist); 1158 GntTree *tree = GNT_TREE(ggc->u.chat->userlist);
1159 PurpleConvChatBuddy *cb = purple_conv_chat_cb_find(PURPLE_CONV_CHAT(conv), new_n); 1159 PurpleChatConversationBuddy *cb = purple_chat_conversation_cb_find(PURPLE_CONV_CHAT(conv), new_n);
1160 1160
1161 gnt_entry_remove_suggest(entry, old); 1161 gnt_entry_remove_suggest(entry, old);
1162 gnt_tree_remove(tree, (gpointer)old); 1162 gnt_tree_remove(tree, (gpointer)old);
1163 1163
1164 gnt_entry_add_suggest(entry, new_n); 1164 gnt_entry_add_suggest(entry, new_n);
1165 gnt_entry_add_suggest(entry, new_a); 1165 gnt_entry_add_suggest(entry, new_a);
1166 gnt_tree_add_row_after(tree, g_strdup(new_n), 1166 gnt_tree_add_row_after(tree, g_strdup(new_n),
1167 gnt_tree_create_row(tree, chat_flag_text(purple_conv_chat_cb_get_flags(cb)), new_a), NULL, NULL); 1167 gnt_tree_create_row(tree, chat_flag_text(purple_chat_conversation_cb_get_flags(cb)), new_a), NULL, NULL);
1168 } 1168 }
1169 1169
1170 static void 1170 static void
1171 finch_chat_remove_users(PurpleConversation *conv, GList *list) 1171 finch_chat_remove_users(PurpleConversation *conv, GList *list)
1172 { 1172 {
1181 } 1181 }
1182 1182
1183 static void 1183 static void
1184 finch_chat_update_user(PurpleConversation *conv, const char *user) 1184 finch_chat_update_user(PurpleConversation *conv, const char *user)
1185 { 1185 {
1186 PurpleConvChatBuddy *cb = purple_conv_chat_cb_find(PURPLE_CONV_CHAT(conv), user); 1186 PurpleChatConversationBuddy *cb = purple_chat_conversation_cb_find(PURPLE_CONV_CHAT(conv), user);
1187 FinchConv *ggc = FINCH_CONV(conv); 1187 FinchConv *ggc = FINCH_CONV(conv);
1188 gnt_tree_change_text(GNT_TREE(ggc->u.chat->userlist), (gpointer)user, 0, chat_flag_text(purple_conv_chat_cb_get_flags(cb))); 1188 gnt_tree_change_text(GNT_TREE(ggc->u.chat->userlist), (gpointer)user, 0, chat_flag_text(purple_chat_conversation_cb_get_flags(cb)));
1189 } 1189 }
1190 1190
1191 static void 1191 static void
1192 finch_conv_present(PurpleConversation *conv) 1192 finch_conv_present(PurpleConversation *conv)
1193 { 1193 {
1237 static PurpleCmdRet 1237 static PurpleCmdRet
1238 say_command_cb(PurpleConversation *conv, 1238 say_command_cb(PurpleConversation *conv,
1239 const char *cmd, char **args, char **error, void *data) 1239 const char *cmd, char **args, char **error, void *data)
1240 { 1240 {
1241 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) 1241 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM)
1242 purple_conv_im_send(PURPLE_CONV_IM(conv), args[0]); 1242 purple_im_conversation_send(PURPLE_CONV_IM(conv), args[0]);
1243 else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) 1243 else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT)
1244 purple_conv_chat_send(PURPLE_CONV_CHAT(conv), args[0]); 1244 purple_chat_conversation_send(PURPLE_CONV_CHAT(conv), args[0]);
1245 1245
1246 return PURPLE_CMD_RET_OK; 1246 return PURPLE_CMD_RET_OK;
1247 } 1247 }
1248 1248
1249 /* Xerox */ 1249 /* Xerox */
1254 char *tmp; 1254 char *tmp;
1255 1255
1256 tmp = g_strdup_printf("/me %s", args[0]); 1256 tmp = g_strdup_printf("/me %s", args[0]);
1257 1257
1258 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) 1258 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM)
1259 purple_conv_im_send(PURPLE_CONV_IM(conv), tmp); 1259 purple_im_conversation_send(PURPLE_CONV_IM(conv), tmp);
1260 else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) 1260 else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT)
1261 purple_conv_chat_send(PURPLE_CONV_CHAT(conv), tmp); 1261 purple_chat_conversation_send(PURPLE_CONV_CHAT(conv), tmp);
1262 1262
1263 g_free(tmp); 1263 g_free(tmp);
1264 return PURPLE_CMD_RET_OK; 1264 return PURPLE_CMD_RET_OK;
1265 } 1265 }
1266 1266
1298 return PURPLE_CMD_RET_OK; 1298 return PURPLE_CMD_RET_OK;
1299 } 1299 }
1300 1300
1301 markup = g_markup_escape_text(tmp, -1); 1301 markup = g_markup_escape_text(tmp, -1);
1302 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) 1302 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM)
1303 purple_conv_im_send(PURPLE_CONV_IM(conv), markup); 1303 purple_im_conversation_send(PURPLE_CONV_IM(conv), markup);
1304 else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) 1304 else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT)
1305 purple_conv_chat_send(PURPLE_CONV_CHAT(conv), markup); 1305 purple_chat_conversation_send(PURPLE_CONV_CHAT(conv), markup);
1306 1306
1307 g_free(tmp); 1307 g_free(tmp);
1308 g_free(markup); 1308 g_free(markup);
1309 return PURPLE_CMD_RET_OK; 1309 return PURPLE_CMD_RET_OK;
1310 } 1310 }

mercurial