Mercurial > pidgin.yaz
diff src/util.c @ 1030:38452403563b
[gaim-migrate @ 1040]
updating the buddy list to work better with multiple connections. there are still a bunch of things fucked up with this but i wanted more people to start working on it than just me, especially since i won't be here this weekend.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 27 Oct 2000 07:53:32 +0000 |
parents | d496fe2614a6 |
children | 80a47e3b1bca |
line wrap: on
line diff
--- a/src/util.c Thu Oct 26 18:05:29 2000 +0000 +++ b/src/util.c Fri Oct 27 07:53:32 2000 +0000 @@ -704,7 +704,7 @@ #endif } -struct aim_user *find_user(const char *name) +struct aim_user *find_user(const char *name, int protocol) { char *who = g_strdup(normalize(name)); GList *usr = aim_users; @@ -713,8 +713,16 @@ while(usr) { u = (struct aim_user *)usr->data; if (!strcmp(normalize(u->username), who)) { - g_free(who); - return u; + if (protocol != -1) { + if (u->protocol == protocol) { + g_free(who); + return u; + } + } else { + g_free(who); + return u; + } + } usr = usr->next; } @@ -1205,7 +1213,7 @@ { struct aim_user *u; - u = find_user (name); + u = find_user (name, -1); if (!u) { /* new user */ u = g_new0(struct aim_user, 1); @@ -1237,7 +1245,7 @@ names = g_strsplit (name, ",", 32); for (n = names; *n != NULL; n++) { printf ("user %s...\n", *n); - u = find_user(*n); + u = find_user(*n, -1); if (u) { /* found a user */ if (first == NULL) first = g_strdup (*n);