diff src/protocols/oscar/oscar.c @ 7406:c91199e88c9e

[gaim-migrate @ 8006] Step 1: Create a bot that sends 3 messages at a time from many different screennames, all with the icon request flag sent. Also, make it warn the user when it receives a buddy icon. Step 2: Set it to flood SeanEgn, causing me to respond with my icon many times per second, getting rate limited and warned. Step 3: Wait for SeanEgn to fix it. Step 4: Get referenced in his commit message. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 01 Nov 2003 17:27:42 +0000
parents 22ed0a0c003d
children d176a85f2581
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Fri Oct 31 15:18:37 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Nov 01 17:27:42 2003 +0000
@@ -166,6 +166,7 @@
 	unsigned long ico_csum;
 	time_t ico_time;
 	gboolean ico_need;
+	gboolean ico_sent;
 };
 
 struct name_data {
@@ -2193,7 +2194,7 @@
 	}
 
 	if ((iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc))) && 
-	    (args->icbmflags & AIM_IMFLAGS_BUDDYREQ)) {
+	    (args->icbmflags & AIM_IMFLAGS_BUDDYREQ) && !bi->ico_sent && bi->ico_informed) {
 		FILE *file;
 		struct stat st;
 
@@ -4326,8 +4327,10 @@
 				args.iconsum   = aimutil_iconsum(buf, st.st_size);
 				args.iconstamp = st.st_mtime;
 
-				if ((args.iconlen != bi->ico_me_len) || (args.iconsum != bi->ico_me_csum) || (args.iconstamp != bi->ico_me_time))
+				if ((args.iconlen != bi->ico_me_len) || (args.iconsum != bi->ico_me_csum) || (args.iconstamp != bi->ico_me_time)) {
 					bi->ico_informed = FALSE;
+					bi->ico_sent     = FALSE;
+				}
 
 				if (!bi->ico_informed) {
 					gaim_debug(GAIM_DEBUG_INFO, "oscar",