| 53 !(prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL)) { |
53 !(prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL)) { |
| 54 do_error_dialog(_("Please enter your password"), NULL, GAIM_ERROR); |
54 do_error_dialog(_("Please enter your password"), NULL, GAIM_ERROR); |
| 55 return; |
55 return; |
| 56 } |
56 } |
| 57 |
57 |
| 58 debug_printf(PACKAGE " " VERSION " logging in %s using %s\n", |
58 gaim_debug(GAIM_DEBUG_INFO, "server", |
| 59 account->username, p->info->name); |
59 PACKAGE " " VERSION " logging in %s using %s\n", |
| |
60 account->username, p->info->name); |
| 60 account->connecting = TRUE; |
61 account->connecting = TRUE; |
| 61 connecting_count++; |
62 connecting_count++; |
| 62 debug_printf("connecting_count: %d\n", connecting_count); |
63 gaim_debug(GAIM_DEBUG_MISC, "server", |
| |
64 "connection count: %d\n", connecting_count); |
| 63 gaim_event_broadcast(event_connecting, account); |
65 gaim_event_broadcast(event_connecting, account); |
| 64 prpl_info->login(account); |
66 prpl_info->login(account); |
| 65 } |
67 } |
| 66 } |
68 } |
| 67 |
69 |
| 80 } |
82 } |
| 81 |
83 |
| 82 static void update_keepalive(struct gaim_connection *gc, gboolean on) |
84 static void update_keepalive(struct gaim_connection *gc, gboolean on) |
| 83 { |
85 { |
| 84 if (on && !gc->keepalive) { |
86 if (on && !gc->keepalive) { |
| 85 debug_printf("allowing NOP\n"); |
87 gaim_debug(GAIM_DEBUG_INFO, "server", "allowing NOP\n"); |
| 86 gc->keepalive = g_timeout_add(60000, send_keepalive, gc); |
88 gc->keepalive = g_timeout_add(60000, send_keepalive, gc); |
| 87 } else if (!on && gc->keepalive > 0) { |
89 } else if (!on && gc->keepalive > 0) { |
| 88 debug_printf("removing NOP\n"); |
90 gaim_debug(GAIM_DEBUG_INFO, "server", "removing NOP\n"); |
| 89 g_source_remove(gc->keepalive); |
91 g_source_remove(gc->keepalive); |
| 90 gc->keepalive = 0; |
92 gc->keepalive = 0; |
| 91 } |
93 } |
| 92 } |
94 } |
| 93 |
95 |
| 752 * a plugin author, don't rely on this, still do your own checks. But uh. |
754 * a plugin author, don't rely on this, still do your own checks. But uh. |
| 753 * It's a start. |
755 * It's a start. |
| 754 */ |
756 */ |
| 755 |
757 |
| 756 if (flags & IM_FLAG_GAIMUSER) |
758 if (flags & IM_FLAG_GAIMUSER) |
| 757 debug_printf("%s is a gaim user.\n", who); |
759 gaim_debug(GAIM_DEBUG_MISC, "%s is a gaim user.\n", who); |
| 758 |
760 |
| 759 /* |
761 /* |
| 760 * We should update the conversation window buttons and menu, |
762 * We should update the conversation window buttons and menu, |
| 761 * if it exists. |
763 * if it exists. |
| 762 */ |
764 */ |
| 1306 if (!conv) |
1309 if (!conv) |
| 1307 return; |
1310 return; |
| 1308 |
1311 |
| 1309 gaim_event_broadcast(event_chat_leave, g, gaim_chat_get_id(chat)); |
1312 gaim_event_broadcast(event_chat_leave, g, gaim_chat_get_id(chat)); |
| 1310 |
1313 |
| 1311 debug_printf("Leaving room %s.\n", gaim_conversation_get_name(conv)); |
1314 gaim_debug(GAIM_DEBUG_INFO, "server", "Leaving room: %s\n", |
| |
1315 gaim_conversation_get_name(conv)); |
| 1312 |
1316 |
| 1313 g->buddy_chats = g_slist_remove(g->buddy_chats, conv); |
1317 g->buddy_chats = g_slist_remove(g->buddy_chats, conv); |
| 1314 |
1318 |
| 1315 gaim_conversation_destroy(conv); |
1319 gaim_conversation_destroy(conv); |
| 1316 } |
1320 } |