Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
5562:3c8d34574601 | 5563:9eb5b13fd412 |
---|---|
566 perror(errmsg); | 566 perror(errmsg); |
567 } | 567 } |
568 #endif | 568 #endif |
569 } | 569 } |
570 | 570 |
571 struct gaim_account *gaim_account_find(const char *name, int protocol) | 571 GaimAccount *gaim_account_find(const char *name, int protocol) |
572 { | 572 { |
573 char *who = g_strdup(normalize(name)); | 573 char *who = g_strdup(normalize(name)); |
574 GSList *accts = gaim_accounts; | 574 GSList *accts = gaim_accounts; |
575 struct gaim_account *account; | 575 GaimAccount *account; |
576 | 576 |
577 while (accts) { | 577 while (accts) { |
578 account = (struct gaim_account *)accts->data; | 578 account = (GaimAccount *)accts->data; |
579 if (!strcmp(normalize(account->username), who)) { | 579 if (!strcmp(normalize(account->username), who)) { |
580 if (protocol != -1) { | 580 if (protocol != -1) { |
581 if (account->protocol == protocol) { | 581 if (account->protocol == protocol) { |
582 g_free(who); | 582 g_free(who); |
583 return account; | 583 return account; |
1006 | 1006 |
1007 return fp; | 1007 return fp; |
1008 } | 1008 } |
1009 | 1009 |
1010 /* AIM URI's ARE FUN :-D */ | 1010 /* AIM URI's ARE FUN :-D */ |
1011 const char *handle_uri(char *uri) { | 1011 const char * |
1012 handle_uri(char *uri) | |
1013 { | |
1014 const char *username; | |
1012 GString *str; | 1015 GString *str; |
1013 GSList *conn = connections; | 1016 GList *conn; |
1014 struct gaim_connection *gc = NULL; | 1017 GaimConnection *gc = NULL; |
1018 GaimAccount *account; | |
1015 | 1019 |
1016 gaim_debug(GAIM_DEBUG_INFO, "handle_uri", "Handling URI: %s\n", uri); | 1020 gaim_debug(GAIM_DEBUG_INFO, "handle_uri", "Handling URI: %s\n", uri); |
1017 | 1021 |
1018 /* Well, we'd better check to make sure we have at least one | 1022 /* Well, we'd better check to make sure we have at least one |
1019 AIM account connected. */ | 1023 AIM account connected. */ |
1020 while (conn) { | 1024 for (conn = gaim_connections_get_all(); conn != NULL; conn = conn->next) { |
1021 gc = conn->data; | 1025 gc = conn->data; |
1022 if (gc->protocol == GAIM_PROTO_OSCAR && isalpha(gc->username[0])) { | 1026 account = gaim_connection_get_account(gc); |
1027 username = gaim_account_get_username(account); | |
1028 | |
1029 if (gaim_account_get_protocol(account) == GAIM_PROTO_OSCAR && | |
1030 username != NULL && isalpha(*username)) { | |
1031 | |
1023 break; | 1032 break; |
1024 } | 1033 } |
1025 conn = conn->next; | |
1026 } | 1034 } |
1027 | 1035 |
1028 if (gc == NULL) | 1036 if (gc == NULL) |
1029 return _("Not connected to AIM"); | 1037 return _("Not connected to AIM"); |
1030 | 1038 |