changeset 1586:bb97d3e8a54d

[gaim-migrate @ 1596] BYE BYE BYE committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Fri, 16 Mar 2001 02:59:54 +0000
parents f367ea8020fb
children 69a004b5820a
files plugins/msn/msn.c
diffstat 1 files changed, 37 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/msn/msn.c	Fri Mar 16 01:59:31 2001 +0000
+++ b/plugins/msn/msn.c	Fri Mar 16 02:59:54 2001 +0000
@@ -556,6 +556,43 @@
 
 		return;
 	}
+	else if (!strncmp("BYE ", buf, 4))
+	{
+		char **res;
+		struct msn_conn *mc;
+
+		res = g_strsplit(buf, " ", 0);
+
+		mc = find_msn_conn_by_user(res[1]);
+
+		if (mc)
+		{
+			/* Looks like we need to close up some stuff :-) */
+
+			if (mc->user)
+				free(mc->user);
+
+			if (mc->secret)
+				free(mc->secret);
+
+			if (mc->session)
+				free(mc->session);
+
+			if (mc->txqueue)
+				free(mc->txqueue);
+
+			gdk_input_remove(mc->inpa);
+			close(mc->fd);
+
+			msn_connections = g_slist_remove(msn_connections, mc);
+
+			g_free(mc);
+		}
+		
+		g_strfreev(res);	
+		return;
+	}
+	
 	else if (!strncmp("XFR ", buf, 4))
 	{
 		char **res;