Mercurial > pidgin
diff src/protocols/msn/switchboard.c @ 8499:467b01d02f9c
[gaim-migrate @ 9235]
Multiple MSN chats should now work. Patch by Robert Mibus. Thanks!
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Thu, 25 Mar 2004 02:55:42 +0000 |
| parents | 3d0178c4f390 |
| children | fc27237783ee |
line wrap: on
line diff
--- a/src/protocols/msn/switchboard.c Thu Mar 25 00:44:26 2004 +0000 +++ b/src/protocols/msn/switchboard.c Thu Mar 25 02:55:42 2004 +0000 @@ -193,7 +193,9 @@ conv = gaim_find_conversation_with_account( msn_user_get_passport(swboard->user), account); - swboard->chat = serv_got_joined_chat(gc, ++swboard->chat_id, + servconn->session->last_chat_id++; + swboard->chat_id = servconn->session->last_chat_id; + swboard->chat = serv_got_joined_chat(gc, swboard->chat_id, "MSN Chat"); gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->chat), @@ -225,8 +227,9 @@ conv = gaim_find_conversation_with_account( msn_user_get_passport(swboard->user), account); - swboard->chat = serv_got_joined_chat(gc, ++swboard->chat_id, - "MSN Chat"); + servconn->session->last_chat_id++; + swboard->chat_id = servconn->session->last_chat_id; + swboard->chat = serv_got_joined_chat(gc, swboard->chat_id, "MSN Chat"); gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->chat), msn_user_get_passport(swboard->user), NULL); gaim_conv_chat_add_user(GAIM_CONV_CHAT(swboard->chat), @@ -295,7 +298,10 @@ MsnSwitchBoard *swboard = servconn->data; if (swboard->chat != NULL) - serv_got_chat_left(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(swboard->chat))); + { + serv_got_chat_left(gc, + gaim_conv_chat_get_id(GAIM_CONV_CHAT(swboard->chat))); + } msn_switchboard_destroy(swboard); @@ -309,7 +315,8 @@ MsnSwitchBoard *swboard = servconn->data; if (!msn_switchboard_send_command(swboard, "CAL", - msn_user_get_passport(swboard->user))) { + msn_user_get_passport(swboard->user))) + { msn_switchboard_destroy(swboard); return FALSE; @@ -357,8 +364,11 @@ } if (swboard->chat != NULL) - serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(swboard->chat)), + { + serv_got_chat_in(gc, + gaim_conv_chat_get_id(GAIM_CONV_CHAT(swboard->chat)), servconn->msg_passport, 0, body, time(NULL)); + } else serv_got_im(gc, servconn->msg_passport, body, 0, time(NULL));
