Mercurial > pidgin.yaz
diff src/util.c @ 4491:3196d9044a45
[gaim-migrate @ 4766]
aim_user is dead. long live gaim_account.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 31 Jan 2003 13:03:47 +0000 |
parents | 62c1e5e656d0 |
children | 42d53c416bb9 |
line wrap: on
line diff
--- a/src/util.c Fri Jan 31 06:51:49 2003 +0000 +++ b/src/util.c Fri Jan 31 13:03:47 2003 +0000 @@ -508,27 +508,27 @@ #endif } -struct aim_user *find_user(const char *name, int protocol) +struct gaim_account *gaim_account_find(const char *name, int protocol) { char *who = g_strdup(normalize(name)); - GSList *usr = aim_users; - struct aim_user *u; + GSList *accts = gaim_accounts; + struct gaim_account *account; - while (usr) { - u = (struct aim_user *)usr->data; - if (!strcmp(normalize(u->username), who)) { + while (accts) { + account = (struct gaim_account *)accts->data; + if (!strcmp(normalize(account->username), who)) { if (protocol != -1) { - if (u->protocol == protocol) { + if (account->protocol == protocol) { g_free(who); - return u; + return account; } } else { g_free(who); - return u; + return account; } } - usr = usr->next; + accts = accts->next; } g_free(who); return NULL; @@ -999,8 +999,8 @@ what = g_strdup(str->str); g_string_free(str, TRUE); } - - c = gaim_conversation_new(GAIM_CONV_IM, gc->user, who); + + c = gaim_conversation_new(GAIM_CONV_IM, gc->account, who); g_free(who); if (what) { @@ -1013,7 +1013,7 @@ char *who, *group; uri = uri + strlen("aim:addbuddy?"); /* spaces are encoded as +'s */ - + if (!(who = strstr(uri, "screenname="))) { return _("No screenname given."); }