Changeset d8d63a2 for protocols/oscar
- Timestamp:
- 2006-12-05T20:40:17Z (18 years ago)
- Branches:
- master
- Children:
- 7740c4c
- Parents:
- f4aa393 (diff), 55078f5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- protocols/oscar
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/oscar/info.c
rf4aa393 rd8d63a2 261 261 if (!identified) { 262 262 /*FIXME*/ 263 /*REMOVEME :-) 263 264 g_strdup_printf("unknown capability: {%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", 264 265 cap[0], cap[1], cap[2], cap[3], … … 268 269 cap[10], cap[11], cap[12], cap[13], 269 270 cap[14], cap[15]); 270 271 */ 271 272 } 272 273 -
protocols/oscar/oscar.c
rf4aa393 rd8d63a2 356 356 } 357 357 358 static void oscar_login(struct aim_user *user) { 358 static void oscar_acc_init(account_t *acc) 359 { 360 set_t *s; 361 362 s = set_add( &acc->set, "server", NULL, set_eval_account, acc ); 363 s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY; 364 365 if (isdigit(acc->user[0])) { 366 s = set_add( &acc->set, "web_aware", "false", set_eval_bool, acc ); 367 s->flags |= ACC_SET_OFFLINE_ONLY; 368 } 369 } 370 371 static void oscar_login(account_t *acc) { 359 372 aim_session_t *sess; 360 373 aim_conn_t *conn; 361 374 char buf[256]; 362 struct gaim_connection *gc = new_gaim_conn( user);375 struct gaim_connection *gc = new_gaim_conn(acc); 363 376 struct oscar_data *odata = gc->proto_data = g_new0(struct oscar_data, 1); 364 377 365 if (isdigit( *user->username)) {378 if (isdigit(acc->user[0])) { 366 379 odata->icq = TRUE; 367 380 /* This is odd but it's necessary for a proper do_import and do_export. 368 381 We don't do those anymore, but let's stick with it, just in case 369 it accidentally fixes something else too... */382 it accidentally fixes something else too... </bitlbee> */ 370 383 gc->password[8] = 0; 371 384 } else { … … 390 403 } 391 404 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]); 405 if (acc->server == NULL) { 406 hide_login_progress(gc, "No servername specified"); 407 signoff(gc); 408 return; 409 } 410 411 if (g_strcasecmp(acc->server, "login.icq.com") != 0 && 412 g_strcasecmp(acc->server, "login.oscar.aol.com") != 0) { 413 serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",acc->server); 395 414 } 396 415 … … 402 421 403 422 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); 423 conn->fd = proxy_connect(acc->server, AIM_LOGIN_PORT, oscar_login_connect, gc); 409 424 if (conn->fd < 0) { 410 425 hide_login_progress(gc, _("Couldn't connect to host")); … … 485 500 struct aim_authresp_info *info; 486 501 int i; char *host; int port; 487 struct aim_user *user;488 502 aim_conn_t *bosconn; 489 503 490 504 struct gaim_connection *gc = sess->aux_data; 491 505 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, 506 port = AIM_LOGIN_PORT; 495 507 496 508 va_start(ap, fr); … … 871 883 struct aim_redirect_data *redir; 872 884 struct gaim_connection *gc = sess->aux_data; 873 struct aim_user *user = gc->user;874 885 aim_conn_t *tstconn; 875 886 int i; … … 877 888 int port; 878 889 879 port = user->proto_opt[USEROPT_AUTHPORT][0] ?880 atoi(user->proto_opt[USEROPT_AUTHPORT]) : AIM_LOGIN_PORT,881 882 890 va_start(ap, fr); 883 891 redir = va_arg(ap, struct aim_redirect_data *); 884 892 va_end(ap); 885 893 894 port = AIM_LOGIN_PORT; 886 895 for (i = 0; i < (int)strlen(redir->ip); i++) { 887 896 if (redir->ip[i] == ':') { … … 1242 1251 channel = va_arg(ap, int); 1243 1252 userinfo = va_arg(ap, aim_userinfo_t *); 1244 1245 if (set_getint(sess->aux_data, "debug")) {1246 serv_got_crap(sess->aux_data, "channel %i called", channel);1247 }1248 1253 1249 1254 switch (channel) { … … 1723 1728 odata->rights.maxsiglen = odata->rights.maxawaymsglen = (guint)maxsiglen; 1724 1729 1730 /* FIXME: It seems we're not really using this, and it broke now that 1731 struct aim_user is dead. 1725 1732 aim_bos_setprofile(sess, fr->conn, gc->user->user_info, NULL, gaim_caps); 1726 1733 */ 1734 1727 1735 return 1; 1728 1736 } … … 2289 2297 } 2290 2298 info_string_append(str, "\n", _("Mobile Phone"), info->mobile); 2291 info_string_append(str, "\n", _("Gender"), info->gender==1 ? _("Female") : _("Male"));2299 info_string_append(str, "\n", _("Gender"), info->gender==1 ? _("Female") : info->gender==2 ? _("Male") : _("Unknown")); 2292 2300 if (info->birthyear || info->birthmonth || info->birthday) { 2293 2301 char date[30]; … … 2656 2664 ret->away_states = oscar_away_states; 2657 2665 ret->login = oscar_login; 2666 ret->acc_init = oscar_acc_init; 2658 2667 ret->close = oscar_close; 2659 2668 ret->send_im = oscar_send_im; … … 2673 2682 ret->set_permit_deny = oscar_set_permit_deny; 2674 2683 ret->keepalive = oscar_keepalive; 2675 ret->cmp_buddynames = aim_sncmp;2676 2684 ret->get_status_string = oscar_get_status_string; 2677 2685 ret->send_typing = oscar_send_typing; 2686 2687 ret->handle_cmp = aim_sncmp; 2678 2688 2679 2689 register_protocol(ret); -
protocols/oscar/rxhandlers.c
rf4aa393 rd8d63a2 112 112 /* Following SNAC will be related */ 113 113 } 114 115 if (set_getint(sess->aux_data, "debug")) {116 serv_got_crap(sess->aux_data, "snac %x/%x received", snac.family, snac.subtype);117 }118 114 119 115 for (cur = (aim_module_t *)sess->modlistv; cur; cur = cur->next) { -
protocols/oscar/service.c
rf4aa393 rd8d63a2 732 732 guint32 data; 733 733 int tlvlen; 734 struct gaim_connection *gc = sess ? sess->aux_data : NULL; 734 735 735 736 data = AIM_ICQ_STATE_HIDEIP | status; /* yay for error checking ;^) */ 737 738 if (gc && set_getbool(&gc->acc->set, "web_aware")) 739 data |= AIM_ICQ_STATE_WEBAWARE; 736 740 737 741 tlvlen = aim_addtlvtochain32(&tl, 0x0006, data);
Note: See TracChangeset
for help on using the changeset viewer.