diff src/list.c @ 4757:c4ebe1a8484b

[gaim-migrate @ 5074] this fixes a bunch of little things, as well as a few big things, plugs a few leaks, and makes the new buddy icon cache stuff much cooler. enjoy! committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 14 Mar 2003 01:14:24 +0000
parents 7c1db830f57b
children c4c28874ecd3
line wrap: on
line diff
--- a/src/list.c	Thu Mar 13 23:28:25 2003 +0000
+++ b/src/list.c	Fri Mar 14 01:14:24 2003 +0000
@@ -164,6 +164,11 @@
 	if (ops)
 		ops->update(gaimbuddylist,(GaimBlistNode*)buddy);
 }
+void gaim_blist_update_buddy_icon(struct buddy *buddy) {
+	struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops;
+	if(ops)
+		ops->update(gaimbuddylist, (GaimBlistNode*)buddy);
+}
 void  gaim_blist_rename_buddy (struct buddy *buddy, const char *name)
 {
 	struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops;
@@ -353,19 +358,26 @@
 
 struct buddy *gaim_find_buddy(struct gaim_account *account, const char *name)
 {
-	GaimBlistNode *group = gaimbuddylist->root;
+	GaimBlistNode *group;
 	GaimBlistNode *buddy;
+	char *norm_name = g_strdup(normalize(name));
+
 	if (!gaimbuddylist)
 		return NULL;
+
+	group = gaimbuddylist->root;
 	while (group) {
 		buddy = group->child;
 		while (buddy) {
-			if (!g_strcasecmp(((struct buddy*)buddy)->name, name) && account == ((struct buddy*)buddy)->account)
+			if (!g_strcasecmp(normalize(((struct buddy*)buddy)->name), norm_name) && account == ((struct buddy*)buddy)->account) {
+				g_free(norm_name);
 				return (struct buddy*)buddy;
+			}
 			buddy = buddy->next;
 		}
 		group = group->next;
 	}
+	g_free(norm_name);
 	return NULL;
 }