Mercurial > pidgin.yaz
comparison src/protocols/oscar/oscar.c @ 2590:2dd86a1af92b
[gaim-migrate @ 2603]
hi.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 23 Oct 2001 20:56:25 +0000 |
parents | 4e149a0b9665 |
children | 2ced57c58653 |
comparison
equal
deleted
inserted
replaced
2589:4e149a0b9665 | 2590:2dd86a1af92b |
---|---|
177 } | 177 } |
178 | 178 |
179 static struct chat_connection *find_oscar_chat(struct gaim_connection *gc, int id) { | 179 static struct chat_connection *find_oscar_chat(struct gaim_connection *gc, int id) { |
180 GSList *g = ((struct oscar_data *)gc->proto_data)->oscar_chats; | 180 GSList *g = ((struct oscar_data *)gc->proto_data)->oscar_chats; |
181 struct chat_connection *c = NULL; | 181 struct chat_connection *c = NULL; |
182 if (gc->protocol != PROTO_OSCAR) return NULL; | |
183 | 182 |
184 while (g) { | 183 while (g) { |
185 c = (struct chat_connection *)g->data; | 184 c = (struct chat_connection *)g->data; |
186 if (c->id == id) | 185 if (c->id == id) |
187 break; | 186 break; |
443 debug_printf(_("Logging in %s\n"), user->username); | 442 debug_printf(_("Logging in %s\n"), user->username); |
444 if (isdigit(*user->username)) { | 443 if (isdigit(*user->username)) { |
445 odata->icq = TRUE; | 444 odata->icq = TRUE; |
446 /* this is odd but it's necessary for a proper do_import and do_export */ | 445 /* this is odd but it's necessary for a proper do_import and do_export */ |
447 gc->protocol = PROTO_ICQ; | 446 gc->protocol = PROTO_ICQ; |
448 } | 447 } else |
448 gc->protocol = PROTO_TOC; | |
449 | 449 |
450 sess = g_new0(aim_session_t, 1); | 450 sess = g_new0(aim_session_t, 1); |
451 | 451 |
452 aim_session_init(sess, AIM_SESS_FLAGS_NONBLOCKCONNECT, 0); | 452 aim_session_init(sess, AIM_SESS_FLAGS_NONBLOCKCONNECT, 0); |
453 aim_setdebuggingcb(sess, oscar_debug); | 453 aim_setdebuggingcb(sess, oscar_debug); |
486 aim_request_login(sess, conn, gc->username); | 486 aim_request_login(sess, conn, gc->username); |
487 } | 487 } |
488 | 488 |
489 static void oscar_close(struct gaim_connection *gc) { | 489 static void oscar_close(struct gaim_connection *gc) { |
490 struct oscar_data *odata = (struct oscar_data *)gc->proto_data; | 490 struct oscar_data *odata = (struct oscar_data *)gc->proto_data; |
491 if (gc->protocol != PROTO_OSCAR) return; | |
492 | 491 |
493 while (odata->oscar_chats) { | 492 while (odata->oscar_chats) { |
494 struct chat_connection *n = odata->oscar_chats->data; | 493 struct chat_connection *n = odata->oscar_chats->data; |
495 if (n->inpa > 0) | 494 if (n->inpa > 0) |
496 gaim_input_remove(n->inpa); | 495 gaim_input_remove(n->inpa); |