Changeset 0a3c243 for protocols/oscar
- Timestamp:
- 2006-06-30T23:18:56Z (18 years ago)
- Branches:
- master
- Children:
- 5100caa
- Parents:
- 5c9512f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/oscar/oscar.c
r5c9512f r0a3c243 356 356 } 357 357 358 static void oscar_login( struct aim_user *user) {358 static void oscar_login(account_t *acc) { 359 359 aim_session_t *sess; 360 360 aim_conn_t *conn; 361 361 char buf[256]; 362 struct gaim_connection *gc = new_gaim_conn( user);362 struct gaim_connection *gc = new_gaim_conn(acc); 363 363 struct oscar_data *odata = gc->proto_data = g_new0(struct oscar_data, 1); 364 364 365 if (isdigit( *user->username)) {365 if (isdigit(acc->user[0])) { 366 366 odata->icq = TRUE; 367 367 /* This is odd but it's necessary for a proper do_import and do_export. 368 368 We don't do those anymore, but let's stick with it, just in case 369 it accidentally fixes something else too... */369 it accidentally fixes something else too... </bitlbee> */ 370 370 gc->password[8] = 0; 371 371 } else { … … 390 390 } 391 391 392 if (g_strcasecmp( user->proto_opt[USEROPT_AUTH], "login.icq.com") != 0 &&393 g_strcasecmp( user->proto_opt[USEROPT_AUTH], "login.oscar.aol.com") != 0) {394 serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.", user->proto_opt[USEROPT_AUTH]);392 if (g_strcasecmp(acc->server, "login.icq.com") != 0 && 393 g_strcasecmp(acc->server, "login.oscar.aol.com") != 0) { 394 serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",acc->server); 395 395 } 396 396 … … 402 402 403 403 conn->status |= AIM_CONN_STATUS_INPROGRESS; 404 conn->fd = proxy_connect(user->proto_opt[USEROPT_AUTH][0] ? 405 user->proto_opt[USEROPT_AUTH] : AIM_DEFAULT_LOGIN_SERVER, 406 user->proto_opt[USEROPT_AUTHPORT][0] ? 407 atoi(user->proto_opt[USEROPT_AUTHPORT]) : AIM_LOGIN_PORT, 408 oscar_login_connect, gc); 404 conn->fd = proxy_connect(acc->server, AIM_LOGIN_PORT, oscar_login_connect, gc); 409 405 if (conn->fd < 0) { 410 406 hide_login_progress(gc, _("Couldn't connect to host")); … … 485 481 struct aim_authresp_info *info; 486 482 int i; char *host; int port; 487 struct aim_user *user;488 483 aim_conn_t *bosconn; 489 484 490 485 struct gaim_connection *gc = sess->aux_data; 491 486 struct oscar_data *od = gc->proto_data; 492 user = gc->user; 493 port = user->proto_opt[USEROPT_AUTHPORT][0] ? 494 atoi(user->proto_opt[USEROPT_AUTHPORT]) : AIM_LOGIN_PORT, 487 port = AIM_LOGIN_PORT; 495 488 496 489 va_start(ap, fr); … … 871 864 struct aim_redirect_data *redir; 872 865 struct gaim_connection *gc = sess->aux_data; 873 struct aim_user *user = gc->user;874 866 aim_conn_t *tstconn; 875 867 int i; … … 877 869 int port; 878 870 879 port = user->proto_opt[USEROPT_AUTHPORT][0] ?880 atoi(user->proto_opt[USEROPT_AUTHPORT]) : AIM_LOGIN_PORT,881 882 871 va_start(ap, fr); 883 872 redir = va_arg(ap, struct aim_redirect_data *); 884 873 va_end(ap); 885 874 875 port = AIM_LOGIN_PORT; 886 876 for (i = 0; i < (int)strlen(redir->ip); i++) { 887 877 if (redir->ip[i] == ':') { … … 1723 1713 odata->rights.maxsiglen = odata->rights.maxawaymsglen = (guint)maxsiglen; 1724 1714 1715 /* FIXME: It seems we're not really using this, and it broke now that 1716 struct aim_user is dead. 1725 1717 aim_bos_setprofile(sess, fr->conn, gc->user->user_info, NULL, gaim_caps); 1726 1718 */ 1719 1727 1720 return 1; 1728 1721 }
Note: See TracChangeset
for help on using the changeset viewer.