comparison src/server.c @ 5211:0241d6b6702d

[gaim-migrate @ 5581] Wrote a new debugging API, and of course core/ui split it. Debug statements can now have debug levels and categories, for future filtering of stuff, and color highlighting. It's nifty, m'kay? committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 26 Apr 2003 06:46:08 +0000
parents fefad67de2c7
children 49f0de976037
comparison
equal deleted inserted replaced
5210:39bb2a35f8d9 5211:0241d6b6702d
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 */
1027 } 1029 }
1028 g_free(tmp); 1030 g_free(tmp);
1029 } 1031 }
1030 1032
1031 if (!b) { 1033 if (!b) {
1032 debug_printf("Error, no such buddy %s\n", name); 1034 gaim_debug(GAIM_DEBUG_ERROR, "server",
1035 "No such buddy: %s\n", name);
1033 return; 1036 return;
1034 } 1037 }
1035 1038
1036 /* This code will 'align' the name from the TOC */ 1039 /* This code will 'align' the name from the TOC */
1037 /* server with what's in our record. We want to */ 1040 /* server with what's in our record. We want to */
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 }