diff src/protocols/msn/switchboard.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 659edfcac14e
children ace8cd0de6ea
line wrap: on
line diff
--- a/src/protocols/msn/switchboard.c	Tue Jan 11 02:00:44 2005 +0000
+++ b/src/protocols/msn/switchboard.c	Tue Jan 11 17:25:06 2005 +0000
@@ -354,9 +354,8 @@
 
 	if (msg->type == MSN_MSG_TEXT)
 	{
-		const char *format;
+		const char *format, *str_reason;
 		char *body_str, *body_enc, *pre, *post;
-		char *str_reason;
 
 #if 0
 		if (swboard->conv == NULL)
@@ -622,21 +621,9 @@
 	{
 		/* This is a switchboard used for a im session */
 
-		char *str = NULL;
-
-		if (cmd->param_count == 2 && atoi(cmd->params[1]) == 1)
+		if (cmd->param_count == 1)
 		{
-#if 0
-			if (gaim_prefs_get_bool("/plugins/prpl/msn/conv_timeout_notice"))
-			{
-				str = g_strdup_printf(_("The conversation has become "
-										"inactive and timed out."));
-			}
-#endif
-		}
-		else
-		{
-			char *username;
+			char *username, *str;
 			GaimAccount *account;
 			GaimBuddy *b;
 
@@ -647,16 +634,14 @@
 			else
 				username = gaim_escape_html(user);
 
-			str = g_strdup_printf(_("%s has closed the conversation "
-						"window."), username);
-		      
+			str = g_strdup_printf(_("%s has closed the conversation window."),
+								  username);
+
 			g_free(username);
-			
+			msn_switchboard_report_user(swboard, GAIM_MESSAGE_SYSTEM, str);
+			g_free(str);
 		}
 
-		if (str != NULL)
-			msn_switchboard_report_user(swboard, GAIM_MESSAGE_SYSTEM, str);
-
 		msn_switchboard_destroy(swboard);
 	}
 }