Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
9362:72c88ac84afa | 9363:997c28571364 |
---|---|
64 swboard->current_users++; | 64 swboard->current_users++; |
65 | 65 |
66 /* gaim_debug_info("msn", "user=[%s], total=%d\n", user, | 66 /* gaim_debug_info("msn", "user=[%s], total=%d\n", user, |
67 * swboard->current_users); */ | 67 * swboard->current_users); */ |
68 | 68 |
69 if (swboard->current_users > 1 || swboard->total_users > 1) | 69 if (gaim_conversation_get_type(swboard->conv) == GAIM_CONV_CHAT) |
70 { | |
71 gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv), user, NULL); | |
72 } | |
73 else if (swboard->current_users > 1 || swboard->total_users > 1) | |
70 { | 74 { |
71 if (swboard->conv == NULL || | 75 if (swboard->conv == NULL || |
72 gaim_conversation_get_type(swboard->conv) != GAIM_CONV_CHAT) | 76 gaim_conversation_get_type(swboard->conv) != GAIM_CONV_CHAT) |
73 { | 77 { |
74 GList *l; | 78 GList *l; |
96 | 100 |
97 gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv), | 101 gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv), |
98 tmp_user, NULL); | 102 tmp_user, NULL); |
99 } | 103 } |
100 | 104 |
101 if (!swboard->invited) | |
102 { | |
103 /* gaim_debug_info("msn", "[chat] " | |
104 "Not invited, so we add im_user [%s].\n", | |
105 swboard->im_user); */ | |
106 | |
107 gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv), | |
108 swboard->im_user, NULL); | |
109 } | |
110 | |
111 /* gaim_debug_info("msn", "[chat] We add ourselves.\n"); */ | 105 /* gaim_debug_info("msn", "[chat] We add ourselves.\n"); */ |
112 | 106 |
113 gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv), | 107 gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv), |
114 gaim_account_get_username(account), | 108 gaim_account_get_username(account), |
115 NULL); | 109 NULL); |
116 | 110 |
117 g_free(swboard->im_user); | 111 g_free(swboard->im_user); |
118 swboard->im_user = NULL; | 112 swboard->im_user = NULL; |
119 } | 113 } |
120 else if (gaim_conversation_get_type(swboard->conv) == GAIM_CONV_CHAT) | |
121 { | |
122 gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->conv), user, NULL); | |
123 } | |
124 } | 114 } |
125 else if (swboard->conv == NULL) | 115 else if (swboard->conv == NULL) |
126 { | 116 { |
127 swboard->conv = gaim_find_conversation_with_account(user, account); | 117 swboard->conv = gaim_find_conversation_with_account(user, account); |
128 } | 118 } |
129 else | 119 else |
130 { | 120 { |
131 gaim_debug_warning("msn", "This should happen!" | 121 gaim_debug_warning("msn", "This should not happen!" |
132 "(msn_switchboard_add_user)\n"); | 122 "(msn_switchboard_add_user)\n"); |
133 } | 123 } |
134 } | 124 } |
135 | 125 |
136 /************************************************************************** | 126 /************************************************************************** |