diff src/protocols/irc/irc.c @ 10504:1a97d5e88d12

[gaim-migrate @ 11796] Lots of things here: - Several memory leak fixes - A few invalid memory access fixes - Fix a yahoo crash going idle when away - Fix Add user in chats to actually fill in the screenname - Add gaim_account_{get,set}_enabled to perl - Fix command priorities (fixes /me in IRC) - Fix MSN notification server transfer to be quiet about it - Fix MSN blist sync if user has insane friendly name - Make the docklet less crash-happy if it fails to embed in 3 seconds - Only probe for native plugins with the correct file extension - 1 typo fix :) ... and quite possibly something else I forgot. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 11 Jan 2005 17:25:06 +0000
parents 93dab54c7bb6
children 761822c6f7ca
line wrap: on
line diff
--- a/src/protocols/irc/irc.c	Tue Jan 11 02:00:44 2005 +0000
+++ b/src/protocols/irc/irc.c	Tue Jan 11 17:25:06 2005 +0000
@@ -399,6 +399,7 @@
 		gaim_timeout_remove(irc->timer);
 	g_hash_table_destroy(irc->cmds);
 	g_hash_table_destroy(irc->msgs);
+	g_hash_table_destroy(irc->buddies);
 	if (irc->motd)
 		g_string_free(irc->motd, TRUE);
 	g_free(irc->server);
@@ -435,10 +436,13 @@
 	const char *args[1];
 	const char *status_id = gaim_status_get_id(status);
 
+	if (!gaim_status_is_active(status))
+		return;
+
+	args[0] = NULL;
+
 	if (!strcmp(status_id, "away"))
 		args[0] = gaim_status_get_attr_string(status, "message");
-	else if (!strcmp(status_id, "available"))
-		args[0] = NULL;
 
 	irc_cmd_away(irc, "away", NULL, args);
 }