libpurple/protocols/irc/irc.c

changeset 40765
a5381c20e802
parent 40708
53a26c29d26c
child 40800
be00e9c87cb7
equal deleted inserted replaced
40763:502c78a7f11f 40765:a5381c20e802
201 PurpleConnection *gc = action->connection; 201 PurpleConnection *gc = action->connection;
202 struct irc_conn *irc; 202 struct irc_conn *irc;
203 char *title, *body; 203 char *title, *body;
204 204
205 if (gc == NULL || purple_connection_get_protocol_data(gc) == NULL) { 205 if (gc == NULL || purple_connection_get_protocol_data(gc) == NULL) {
206 purple_debug(PURPLE_DEBUG_ERROR, "irc", "got MOTD request for NULL gc\n"); 206 purple_debug_error("irc", "got MOTD request for NULL gc");
207 return; 207 return;
208 } 208 }
209 irc = purple_connection_get_protocol_data(gc); 209 irc = purple_connection_get_protocol_data(gc);
210 if (irc->motd == NULL) { 210 if (irc->motd == NULL) {
211 purple_notify_error(gc, _("Error displaying MOTD"), 211 purple_notify_error(gc, _("Error displaying MOTD"),
797 struct irc_conn *irc = purple_connection_get_protocol_data(gc); 797 struct irc_conn *irc = purple_connection_get_protocol_data(gc);
798 PurpleConversation *convo = PURPLE_CONVERSATION(purple_conversations_find_chat(gc, id)); 798 PurpleConversation *convo = PURPLE_CONVERSATION(purple_conversations_find_chat(gc, id));
799 const char *args[2]; 799 const char *args[2];
800 800
801 if (!convo) { 801 if (!convo) {
802 purple_debug(PURPLE_DEBUG_ERROR, "irc", "Got chat invite request for bogus chat\n"); 802 purple_debug_error("irc", "Got chat invite request for bogus chat");
803 return; 803 return;
804 } 804 }
805 args[0] = name; 805 args[0] = name;
806 args[1] = purple_conversation_get_name(convo); 806 args[1] = purple_conversation_get_name(convo);
807 irc_cmd_invite(irc, "invite", purple_conversation_get_name(convo), args); 807 irc_cmd_invite(irc, "invite", purple_conversation_get_name(convo), args);
833 PurpleConversation *convo = PURPLE_CONVERSATION(purple_conversations_find_chat(gc, id)); 833 PurpleConversation *convo = PURPLE_CONVERSATION(purple_conversations_find_chat(gc, id));
834 const char *args[2]; 834 const char *args[2];
835 char *tmp; 835 char *tmp;
836 836
837 if (!convo) { 837 if (!convo) {
838 purple_debug(PURPLE_DEBUG_ERROR, "irc", "chat send on nonexistent chat\n"); 838 purple_debug_error("irc", "chat send on nonexistent chat");
839 return -EINVAL; 839 return -EINVAL;
840 } 840 }
841 purple_markup_html_to_xhtml(purple_message_get_contents(msg), NULL, &tmp); 841 purple_markup_html_to_xhtml(purple_message_get_contents(msg), NULL, &tmp);
842 args[0] = purple_conversation_get_name(convo); 842 args[0] = purple_conversation_get_name(convo);
843 args[1] = tmp; 843 args[1] = tmp;

mercurial