Changeset 0a3c243 for protocols/oscar


Ignore:
Timestamp:
2006-06-30T23:18:56Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
5100caa
Parents:
5c9512f
Message:

Got rid of struct aim_user (now using account_t everywhere). Needs some more
testing though.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/oscar.c

    r5c9512f r0a3c243  
    356356}
    357357
    358 static void oscar_login(struct aim_user *user) {
     358static void oscar_login(account_t *acc) {
    359359        aim_session_t *sess;
    360360        aim_conn_t *conn;
    361361        char buf[256];
    362         struct gaim_connection *gc = new_gaim_conn(user);
     362        struct gaim_connection *gc = new_gaim_conn(acc);
    363363        struct oscar_data *odata = gc->proto_data = g_new0(struct oscar_data, 1);
    364364
    365         if (isdigit(*user->username)) {
     365        if (isdigit(acc->user[0])) {
    366366                odata->icq = TRUE;
    367367                /* This is odd but it's necessary for a proper do_import and do_export.
    368368                   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> */
    370370                gc->password[8] = 0;
    371371        } else {
     
    390390        }
    391391       
    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);
    395395        }
    396396       
     
    402402
    403403        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);
    409405        if (conn->fd < 0) {
    410406                hide_login_progress(gc, _("Couldn't connect to host"));
     
    485481        struct aim_authresp_info *info;
    486482        int i; char *host; int port;
    487         struct aim_user *user;
    488483        aim_conn_t *bosconn;
    489484
    490485        struct gaim_connection *gc = sess->aux_data;
    491486        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;
    495488
    496489        va_start(ap, fr);
     
    871864        struct aim_redirect_data *redir;
    872865        struct gaim_connection *gc = sess->aux_data;
    873         struct aim_user *user = gc->user;
    874866        aim_conn_t *tstconn;
    875867        int i;
     
    877869        int port;
    878870
    879         port = user->proto_opt[USEROPT_AUTHPORT][0] ?
    880                 atoi(user->proto_opt[USEROPT_AUTHPORT]) : AIM_LOGIN_PORT,
    881 
    882871        va_start(ap, fr);
    883872        redir = va_arg(ap, struct aim_redirect_data *);
    884873        va_end(ap);
    885874
     875        port = AIM_LOGIN_PORT;
    886876        for (i = 0; i < (int)strlen(redir->ip); i++) {
    887877                if (redir->ip[i] == ':') {
     
    17231713        odata->rights.maxsiglen = odata->rights.maxawaymsglen = (guint)maxsiglen;
    17241714
     1715        /* FIXME: It seems we're not really using this, and it broke now that
     1716           struct aim_user is dead.
    17251717        aim_bos_setprofile(sess, fr->conn, gc->user->user_info, NULL, gaim_caps);
    1726 
     1718        */
     1719       
    17271720        return 1;
    17281721}
Note: See TracChangeset for help on using the changeset viewer.