diff src/protocols/irc/irc.c @ 9553:8a64666476e6

[gaim-migrate @ 10386] (13:06:08) nosnilmot: Paco-Paco / LSchiere: this cures the flooding on signon for me committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 17 Jul 2004 17:08:24 +0000
parents 7a65fdba750f
children db62420a53a2
line wrap: on
line diff
--- a/src/protocols/irc/irc.c	Fri Jul 16 16:45:32 2004 +0000
+++ b/src/protocols/irc/irc.c	Sat Jul 17 17:08:24 2004 +0000
@@ -123,6 +123,17 @@
 	g_string_append_printf(string, "%s ", name);
 }
 
+static void irc_ison_one(struct irc_conn *irc, struct irc_buddy *ib)
+{
+	char *buf;
+
+	ib->flag = FALSE;
+	buf = irc_format(irc, "vn", "ISON", ib->name);
+	irc_send(irc, buf);
+	g_free(buf);
+}
+
+
 static const char *irc_blist_icon(GaimAccount *a, GaimBuddy *b)
 {
 	return "irc";
@@ -345,7 +356,11 @@
 	ib->name = g_strdup(buddy->name);
 	g_hash_table_insert(irc->buddies, ib->name, ib);
 
-	irc_blist_timeout(irc);
+	/* if the timer isn't set, this is during signon, so we don't want to flood
+	 * ourself off with ISON's, so we don't, but after that we want to know when
+	 * someone's online asap */
+	if (irc->timer)
+		irc_ison_one(irc, ib);
 }
 
 static void irc_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group)