| 1 /** |
1 /** |
| 2 * @file switchboard.c MSN switchboard functions |
2 * @file switchboard.c MSN switchboard functions |
| 3 * |
3 * |
| 4 * gaim |
4 * gaim |
| 5 * |
5 * |
| 6 * Copyright (C) 2003, Christian Hammond <chipx86@gnupdate.org> |
6 * Gaim is the legal property of its developers, whose names are too numerous |
| |
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
| |
8 * source distribution. |
| 7 * |
9 * |
| 8 * This program is free software; you can redistribute it and/or modify |
10 * This program is free software; you can redistribute it and/or modify |
| 9 * it under the terms of the GNU General Public License as published by |
11 * it under the terms of the GNU General Public License as published by |
| 10 * the Free Software Foundation; either version 2 of the License, or |
12 * the Free Software Foundation; either version 2 of the License, or |
| 11 * (at your option) any later version. |
13 * (at your option) any later version. |
| 50 void |
52 void |
| 51 msn_switchboard_add_user(MsnSwitchBoard *swboard, const char *user) |
53 msn_switchboard_add_user(MsnSwitchBoard *swboard, const char *user) |
| 52 { |
54 { |
| 53 MsnCmdProc *cmdproc; |
55 MsnCmdProc *cmdproc; |
| 54 GaimAccount *account; |
56 GaimAccount *account; |
| 55 |
57 |
| 56 g_return_if_fail(swboard != NULL); |
58 g_return_if_fail(swboard != NULL); |
| 57 |
59 |
| 58 cmdproc = swboard->servconn->cmdproc; |
60 cmdproc = swboard->servconn->cmdproc; |
| 59 account = swboard->servconn->session->account; |
61 account = swboard->servconn->session->account; |
| 60 |
62 |
| 146 |
148 |
| 147 /* send_clientcaps(swboard); */ |
149 /* send_clientcaps(swboard); */ |
| 148 |
150 |
| 149 if (session->protocol_ver >= 9) |
151 if (session->protocol_ver >= 9) |
| 150 { |
152 { |
| 151 GList *l; |
153 GList *l; |
| 152 |
154 |
| 153 /* But we already know the switchboard... */ |
155 /* But we already know the switchboard... */ |
| 154 /* What if there is more than one user? */ |
156 /* What if there is more than one user? */ |
| 155 for (l = swboard->users; l != NULL; l = l->next) |
157 for (l = swboard->users; l != NULL; l = l->next) |
| 156 { |
158 { |
| 259 swboard->user_joined = TRUE; |
261 swboard->user_joined = TRUE; |
| 260 |
262 |
| 261 /* msn_cmdproc_process_queue(cmdproc); */ |
263 /* msn_cmdproc_process_queue(cmdproc); */ |
| 262 |
264 |
| 263 msn_switchboard_process_queue(swboard); |
265 msn_switchboard_process_queue(swboard); |
| 264 |
266 |
| 265 send_clientcaps(swboard); |
267 send_clientcaps(swboard); |
| 266 |
268 |
| 267 #if 1 |
269 #if 1 |
| 268 if (session->protocol_ver >= 9) |
270 if (session->protocol_ver >= 9) |
| 269 /* But we already know the switchboard... */ |
271 /* But we already know the switchboard... */ |
| 594 /* They might skip the history */ |
596 /* They might skip the history */ |
| 595 msn_table_add_cmd(cbs_table, NULL, "ACK", NULL); |
597 msn_table_add_cmd(cbs_table, NULL, "ACK", NULL); |
| 596 #endif |
598 #endif |
| 597 |
599 |
| 598 msn_table_add_error(cbs_table, "MSG", NULL); |
600 msn_table_add_error(cbs_table, "MSG", NULL); |
| 599 |
601 |
| 600 /* Register the message type callbacks. */ |
602 /* Register the message type callbacks. */ |
| 601 msn_table_add_msg_type(cbs_table, "text/plain", |
603 msn_table_add_msg_type(cbs_table, "text/plain", |
| 602 plain_msg); |
604 plain_msg); |
| 603 msn_table_add_msg_type(cbs_table, "text/x-msmsgscontrol", |
605 msn_table_add_msg_type(cbs_table, "text/x-msmsgscontrol", |
| 604 control_msg); |
606 control_msg); |