changeset 5043:494a050318c7

[gaim-migrate @ 5390] Now multiple pounces for one buddy will trigger on the actions. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 05 Apr 2003 21:51:17 +0000
parents 20b4b0328a3e
children 2738dcb5cae2
files src/pounce.c
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/pounce.c	Sat Apr 05 19:09:53 2003 +0000
+++ b/src/pounce.c	Sat Apr 05 21:51:17 2003 +0000
@@ -146,14 +146,22 @@
 					const char *pouncee, GaimPounceEvent events)
 {
 	struct gaim_pounce *pounce;
+	GList *l;
 
 	if (events == GAIM_POUNCE_NONE || pouncer == NULL || pouncee == NULL)
 		return;
 
-	pounce = gaim_find_pounce(pouncer, pouncee, events);
+	for (l = gaim_get_pounces(); l != NULL; l = l->next) {
+		pounce = (struct gaim_pounce *)l->data;
 
-	if (pounce != NULL && pounce->callback != NULL)
-		pounce->callback(pounce, events, gaim_pounce_get_data(pounce));
+		if ((gaim_pounce_get_events(pounce) & events) &&
+			(gaim_pounce_get_pouncer(pounce) == pouncer) &&
+			!strcmp(gaim_pounce_get_pouncee(pounce), pouncee)) {
+
+			if (pounce->callback != NULL)
+				pounce->callback(pounce, events, gaim_pounce_get_data(pounce));
+		}
+	}
 }
 
 struct gaim_pounce *