Mercurial > pidgin
diff src/protocols/msn/msn.c @ 10533:ace8cd0de6ea
[gaim-migrate @ 11862]
Some minor MSN reorganization from Felipe and a bunch of MSN chat related fixes
and improvements from me.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 20 Jan 2005 16:37:14 +0000 |
parents | 1a97d5e88d12 |
children | fed2a7c2471d |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Thu Jan 20 14:40:56 2005 +0000 +++ b/src/protocols/msn/msn.c Thu Jan 20 16:37:14 2005 +0000 @@ -1076,16 +1076,21 @@ { MsnSession *session; MsnSwitchBoard *swboard; - MsnCmdProc *cmdproc; session = gc->proto_data; swboard = msn_session_find_switch_with_id(session, id); - g_return_if_fail(swboard != NULL); - cmdproc = swboard->servconn->cmdproc; + if (swboard == NULL) + { + /* if we have no switchboard, everyone else left the chat already */ + swboard = msn_switchboard_new(session); + msn_switchboard_request(swboard); + swboard->chat_id = id; + swboard->conv = gaim_find_chat(gc, id); + } - msn_cmdproc_send(cmdproc, "CAL", "%s", who); + msn_switchboard_request_add_user(swboard, who); } static void @@ -1097,11 +1102,12 @@ session = gc->proto_data; swboard = msn_session_find_switch_with_id(session, id); - g_return_if_fail(swboard != NULL); + + /* if swboard is NULL we were the only person left anyway */ + if (swboard == NULL) + return; msn_switchboard_close(swboard); - - /* serv_got_chat_left(gc, id); */ } static int