| 139 static void |
139 static void |
| 140 pidgin_connection_report_disconnect(PurpleConnection *gc, const char *text) |
140 pidgin_connection_report_disconnect(PurpleConnection *gc, const char *text) |
| 141 { |
141 { |
| 142 PurpleAccount *account = NULL; |
142 PurpleAccount *account = NULL; |
| 143 PidginAutoRecon *info; |
143 PidginAutoRecon *info; |
| |
144 GList *list; |
| 144 |
145 |
| 145 account = purple_connection_get_account(gc); |
146 account = purple_connection_get_account(gc); |
| 146 info = g_hash_table_lookup(auto_reconns, account); |
147 info = g_hash_table_lookup(auto_reconns, account); |
| 147 |
148 |
| 148 pidgin_blist_update_account_error_state(account, text); |
149 pidgin_blist_update_account_error_state(account, text); |
| 190 * disconnected by wants_to_die? This happens when you sign |
191 * disconnected by wants_to_die? This happens when you sign |
| 191 * on from somewhere else, or when you enter an invalid password. |
192 * on from somewhere else, or when you enter an invalid password. |
| 192 */ |
193 */ |
| 193 purple_account_set_enabled(account, PIDGIN_UI, FALSE); |
194 purple_account_set_enabled(account, PIDGIN_UI, FALSE); |
| 194 } |
195 } |
| |
196 |
| |
197 /* If we have any open chats, we probably want to rejoin when we get back online. */ |
| |
198 list = purple_get_chats(); |
| |
199 while (list) { |
| |
200 PurpleConversation *conv = list->data; |
| |
201 list = list->next; |
| |
202 if (conv->account != account || |
| |
203 purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv))) |
| |
204 continue; |
| |
205 purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE)); |
| |
206 } |
| 195 } |
207 } |
| 196 |
208 |
| 197 static void pidgin_connection_network_connected () |
209 static void pidgin_connection_network_connected () |
| 198 { |
210 { |
| 199 GList *list = purple_accounts_get_all_active(); |
211 GList *list = purple_accounts_get_all_active(); |