# HG changeset patch # User Sadrul Habib Chowdhury # Date 1208106725 0 # Node ID f75509f776ccab53d463ad43b308e773c918a992 # Parent d14294a40d74cb715d7710da5776c89707426d64 When you try to execute a command (e.g., /part etc.) in a chat on a disconnected account, the command fails. But there's no notification of the failure. Fix this by making sure the error message gets written in the conv. diff -r d14294a40d74 -r f75509f776cc libpurple/conversation.c --- a/libpurple/conversation.c Sun Apr 13 16:54:33 2008 +0000 +++ b/libpurple/conversation.c Sun Apr 13 17:12:05 2008 +0000 @@ -862,7 +862,7 @@ gc = purple_account_get_connection(account); if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT && - (gc == NULL || !g_slist_find(gc->buddy_chats, conv))) + (gc != NULL && !g_slist_find(gc->buddy_chats, conv))) return; if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM && diff -r d14294a40d74 -r f75509f776cc pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sun Apr 13 16:54:33 2008 +0000 +++ b/pidgin/gtkconv.c Sun Apr 13 17:12:05 2008 +0000 @@ -5430,7 +5430,7 @@ account = purple_conversation_get_account(conv); g_return_if_fail(account != NULL); gc = purple_account_get_connection(account); - g_return_if_fail(gc != NULL); + g_return_if_fail(gc != NULL || !(flags & (PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_RECV))); /* Make sure URLs are clickable */ if(flags & PURPLE_MESSAGE_NO_LINKIFY) @@ -5463,7 +5463,7 @@ } win = gtkconv->win; - prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); + prpl_info = gc ? PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl) : NULL; line_count = gtk_text_buffer_get_line_count( gtk_text_view_get_buffer(GTK_TEXT_VIEW( @@ -5702,7 +5702,7 @@ g_free(alias_escaped); /* Are we in a chat where we can tell which users are buddies? */ - if (!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME) && + if (prpl_info && !(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME) && purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { /* Bold buddies to make them stand out from non-buddies. */