Mercurial > pidgin.yaz
diff src/util.c @ 5563:9eb5b13fd412
[gaim-migrate @ 5965]
Just a taste of what's coming.
Standard "This won't compile" thing. Plugin authors, you're going to hate
me, but that's okay, because I have friends too!
It's really late. My brain resembles that of fish swimming in jello pudding
with neon lights flying around chanting musicals. I'm not on drugs. I'm
just that tired.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 30 May 2003 09:38:29 +0000 |
parents | 7a64114641c3 |
children | 86456ec3ca25 |
line wrap: on
line diff
--- a/src/util.c Fri May 30 04:13:58 2003 +0000 +++ b/src/util.c Fri May 30 09:38:29 2003 +0000 @@ -568,14 +568,14 @@ #endif } -struct gaim_account *gaim_account_find(const char *name, int protocol) +GaimAccount *gaim_account_find(const char *name, int protocol) { char *who = g_strdup(normalize(name)); GSList *accts = gaim_accounts; - struct gaim_account *account; + GaimAccount *account; while (accts) { - account = (struct gaim_account *)accts->data; + account = (GaimAccount *)accts->data; if (!strcmp(normalize(account->username), who)) { if (protocol != -1) { if (account->protocol == protocol) { @@ -1008,21 +1008,29 @@ } /* AIM URI's ARE FUN :-D */ -const char *handle_uri(char *uri) { +const char * +handle_uri(char *uri) +{ + const char *username; GString *str; - GSList *conn = connections; - struct gaim_connection *gc = NULL; + GList *conn; + GaimConnection *gc = NULL; + GaimAccount *account; gaim_debug(GAIM_DEBUG_INFO, "handle_uri", "Handling URI: %s\n", uri); /* Well, we'd better check to make sure we have at least one AIM account connected. */ - while (conn) { + for (conn = gaim_connections_get_all(); conn != NULL; conn = conn->next) { gc = conn->data; - if (gc->protocol == GAIM_PROTO_OSCAR && isalpha(gc->username[0])) { + account = gaim_connection_get_account(gc); + username = gaim_account_get_username(account); + + if (gaim_account_get_protocol(account) == GAIM_PROTO_OSCAR && + username != NULL && isalpha(*username)) { + break; } - conn = conn->next; } if (gc == NULL)