| 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; |