pidgin.2.x.y: b9fd3755: Remove periodic WHO on IRC.

elb at pidgin.im elb at pidgin.im
Wed May 2 20:11:08 EDT 2012


----------------------------------------------------------------------
Revision: b9fd37553a90f47c560be425179d044468a21f96
Parent:   4f584fdb31dff828dad91f14e23d0cfee9a64ff3
Author:   elb at pidgin.im
Date:     05/02/12 20:09:14
Branch:   im.pidgin.pidgin.2.x.y
URL: http://d.pidgin.im/viewmtn/revision/info/b9fd37553a90f47c560be425179d044468a21f96

Changelog: 

Remove periodic WHO on IRC.

I believe I have left enough functionality here that a misguided
libpurple client can continue to trigger WHO from its own UI.

References #11089, #14602
Fixes #14955

Changes against parent 4f584fdb31dff828dad91f14e23d0cfee9a64ff3

  patched  libpurple/protocols/irc/irc.c
  patched  libpurple/protocols/irc/irc.h
  patched  libpurple/protocols/irc/msgs.c

-------------- next part --------------
============================================================
--- libpurple/protocols/irc/irc.c	c50575ab5358f66696f67c259895634663e4efc1
+++ libpurple/protocols/irc/irc.c	b97a4b8068409af9c41b6c805d05f1d8bcecc440
@@ -4,7 +4,7 @@
  * purple
  *
  * Copyright (C) 2003, Robbert Haarman <purple at inglorion.net>
- * Copyright (C) 2003, Ethan Blanton <eblanton at cs.purdue.edu>
+ * Copyright (C) 2003, 2012 Ethan Blanton <elb at pidgin.im>
  * Copyright (C) 2000-2003, Rob Flynn <rob at tgflinux.com>
  * Copyright (C) 1998-1999, Mark Spencer <markster at marko.net>
  *
@@ -41,8 +41,6 @@ static void irc_ison_buddy_init(char *na
 
 static void irc_ison_buddy_init(char *name, struct irc_buddy *ib, GList **list);
 
-static void irc_who_channel(PurpleConversation *conv, struct irc_conn *irc);
-
 static const char *irc_blist_icon(PurpleAccount *a, PurpleBuddy *b);
 static GList *irc_status_types(PurpleAccount *account);
 static GList *irc_actions(PurplePlugin *plugin, gpointer context);
@@ -241,29 +239,6 @@ static void irc_ison_buddy_init(char *na
 }
 
 
-gboolean irc_who_channel_timeout(struct irc_conn *irc)
-{
-	// WHO all of our channels.
-	g_list_foreach(purple_get_conversations(), (GFunc)irc_who_channel, (gpointer)irc);
-	
-	return TRUE;
-}
-
-static void irc_who_channel(PurpleConversation *conv, struct irc_conn *irc)
-{
-	if (purple_conversation_get_account(conv) == irc->account
-	    && purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT
-	    && !purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv))) {
-		char *buf = irc_format(irc, "vc", "WHO", purple_conversation_get_name(conv));
-		
-		purple_debug(PURPLE_DEBUG_INFO, "irc",
-			     "Performing periodic who on %s\n",
-			     purple_conversation_get_name(conv));
-		irc_send(irc, buf);
-		g_free(buf);
-	}
-}
-
 static void irc_ison_one(struct irc_conn *irc, struct irc_buddy *ib)
 {
 	char *buf;
@@ -536,8 +511,6 @@ static void irc_close(PurpleConnection *
 	}
 	if (irc->timer)
 		purple_timeout_remove(irc->timer);
-	if (irc->who_channel_timer)
-		purple_timeout_remove(irc->who_channel_timer);
 	g_hash_table_destroy(irc->cmds);
 	g_hash_table_destroy(irc->msgs);
 	g_hash_table_destroy(irc->buddies);
============================================================
--- libpurple/protocols/irc/irc.h	898f5f8b0dda728c4f0465eb2edee4ee55ca519a
+++ libpurple/protocols/irc/irc.h	2cff8ff8544e9c7b1c169c9926f51d9bbd129628
@@ -3,7 +3,7 @@
  *
  * purple
  *
- * Copyright (C) 2003, Ethan Blanton <eblanton at cs.purdue.edu>
+ * Copyright (C) 2003, 2012 Ethan Blanton <elb at pidgin.im>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -55,7 +55,6 @@ struct irc_conn {
 	char *server;
 	int fd;
 	guint timer;
-	guint who_channel_timer;
 	GHashTable *buddies;
 
 	gboolean ison_outstanding;
============================================================
--- libpurple/protocols/irc/msgs.c	e3a01ebf143502b0ea9b59aa3c2294f818608ea5
+++ libpurple/protocols/irc/msgs.c	1a8b5b3acaa301d0e3fefb1fbd8e9abe5dc81253
@@ -3,7 +3,7 @@
  *
  * purple
  *
- * Copyright (C) 2003, Ethan Blanton <eblanton at cs.purdue.edu>
+ * Copyright (C) 2003, 2012 Ethan Blanton <elb at pidgin.im>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -110,8 +110,6 @@ static void irc_connected(struct irc_con
 	irc_blist_timeout(irc);
 	if (!irc->timer)
 		irc->timer = purple_timeout_add_seconds(45, (GSourceFunc)irc_blist_timeout, (gpointer)irc);
-    if (!irc->who_channel_timer)
-        irc->who_channel_timer = purple_timeout_add_seconds(300, (GSourceFunc)irc_who_channel_timeout, (gpointer)irc);
 }
 
 void irc_msg_default(struct irc_conn *irc, const char *name, const char *from, char **args)
@@ -463,6 +461,10 @@ void irc_msg_who(struct irc_conn *irc, c
 		
 		flags = cb->flags;
 
+		/* FIXME: I'm not sure this is really a good idea, now
+		 * that we no longer do periodic WHO.  It seems to me
+		 * like it's more likely to be confusing than not.
+		 * Comments? */
 		if (args[6][0] == 'G' && !(flags & PURPLE_CBFLAGS_AWAY)) {
 			purple_conv_chat_user_set_flags(chat, cb->name, flags | PURPLE_CBFLAGS_AWAY);
 		} else if(args[6][0] == 'H' && (flags & PURPLE_CBFLAGS_AWAY)) {


More information about the Commits mailing list