diff src/protocols/msn/switchboard.c @ 9363:997c28571364

[gaim-migrate @ 10171] Patches by Felipe (shx) to clean up some code, add some segfault precautions, fix chats so that we'll see the other users in the chat correctly after invites, and to have MSN ignore the local buddy list adds if we're not already signed on (which fixes a *very* annoying bug I was having). Thanks again! committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 23 Jun 2004 19:38:58 +0000
parents 08e7ccb4610d
children 7b56b8ba3dff
line wrap: on
line diff
--- a/src/protocols/msn/switchboard.c	Wed Jun 23 18:34:37 2004 +0000
+++ b/src/protocols/msn/switchboard.c	Wed Jun 23 19:38:58 2004 +0000
@@ -66,7 +66,11 @@
 	/* gaim_debug_info("msn", "user=[%s], total=%d\n", user,
 	 * swboard->current_users); */
 
-	if (swboard->current_users > 1 || swboard->total_users > 1)
+	if (gaim_conversation_get_type(swboard->conv) == GAIM_CONV_CHAT)
+	{
+		gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv), user, NULL);
+	}
+	else if (swboard->current_users > 1 || swboard->total_users > 1)
 	{
 		if (swboard->conv == NULL ||
 			gaim_conversation_get_type(swboard->conv) != GAIM_CONV_CHAT)
@@ -98,16 +102,6 @@
 										tmp_user, NULL);
 			}
 
-			if (!swboard->invited)
-			{
-				/* gaim_debug_info("msn", "[chat] "
-								"Not invited, so we add im_user [%s].\n",
-								swboard->im_user); */
-
-				gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv),
-										swboard->im_user, NULL);
-			}
-
 			/* gaim_debug_info("msn", "[chat] We add ourselves.\n"); */
 
 			gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv),
@@ -117,10 +111,6 @@
 			g_free(swboard->im_user);
 			swboard->im_user = NULL;
 		}
-		else if (gaim_conversation_get_type(swboard->conv) == GAIM_CONV_CHAT)
-		{
-			gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv), user, NULL);
-		}
 	}
 	else if (swboard->conv == NULL)
 	{
@@ -128,7 +118,7 @@
 	}
 	else
 	{
-		gaim_debug_warning("msn", "This should happen!"
+		gaim_debug_warning("msn", "This should not happen!"
 						   "(msn_switchboard_add_user)\n");
 	}
 }