Mercurial > pidgin
annotate src/protocols/msn/cmdproc.c @ 10234:d672afd04dcd
[gaim-migrate @ 11369]
"text replacement cosmetic change," patch 705648 from
Craig Slusher. This was submitted on 2003-03-18 and
it still basically applies. Neat.
"This just changes the way that the plugin reacts to the
'Add' button being clicked. After the replacement is
placed into the list, the text boxes are cleared and
the 'You type:' box gains focus"
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Mon, 22 Nov 2004 05:36:09 +0000 |
| parents | ecf3ce2e2ab1 |
| children | f776e117c17b |
| rev | line source |
|---|---|
| 8810 | 1 /** |
| 2 * @file cmdproc.c MSN command processor functions | |
| 3 * | |
| 4 * gaim | |
| 5 * | |
|
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
6 * Gaim is the legal property of its developers, whose names are too numerous |
|
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
|
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
8 * source distribution. |
| 8810 | 9 * |
| 10 * This program is free software; you can redistribute it and/or modify | |
| 11 * it under the terms of the GNU General Public License as published by | |
| 12 * the Free Software Foundation; either version 2 of the License, or | |
| 13 * (at your option) any later version. | |
| 14 * | |
| 15 * This program is distributed in the hope that it will be useful, | |
| 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 * GNU General Public License for more details. | |
| 19 * | |
| 20 * You should have received a copy of the GNU General Public License | |
| 21 * along with this program; if not, write to the Free Software | |
| 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 23 */ | |
| 24 #include "msn.h" | |
| 25 #include "cmdproc.h" | |
| 26 | |
| 27 MsnCmdProc * | |
| 28 msn_cmdproc_new(MsnSession *session) | |
| 29 { | |
| 30 MsnCmdProc *cmdproc; | |
| 31 | |
| 32 cmdproc = g_new0(MsnCmdProc, 1); | |
| 33 | |
| 34 cmdproc->session = session; | |
| 35 cmdproc->txqueue = g_queue_new(); | |
| 36 cmdproc->history = msn_history_new(); | |
| 37 | |
| 38 return cmdproc; | |
| 39 } | |
| 40 | |
| 41 void | |
| 42 msn_cmdproc_destroy(MsnCmdProc *cmdproc) | |
| 43 { | |
| 44 MsnTransaction *trans; | |
| 45 | |
| 46 if (cmdproc->last_trans != NULL) | |
| 47 g_free(cmdproc->last_trans); | |
| 48 | |
| 49 while ((trans = g_queue_pop_head(cmdproc->txqueue)) != NULL) | |
| 50 msn_transaction_destroy(trans); | |
| 51 | |
| 52 g_queue_free(cmdproc->txqueue); | |
| 53 | |
| 54 msn_history_destroy(cmdproc->history); | |
| 55 } | |
| 56 | |
| 57 void | |
| 58 msn_cmdproc_process_queue(MsnCmdProc *cmdproc) | |
| 59 { | |
| 60 MsnTransaction *trans; | |
| 61 | |
| 62 while ((trans = g_queue_pop_head(cmdproc->txqueue)) != NULL && | |
| 63 cmdproc->error == 0) | |
| 64 { | |
| 65 msn_cmdproc_send_trans(cmdproc, trans); | |
| 66 } | |
| 67 } | |
| 68 | |
| 69 void | |
| 70 msn_cmdproc_queue_trans(MsnCmdProc *cmdproc, MsnTransaction *trans) | |
| 71 { | |
| 72 g_return_if_fail(cmdproc != NULL); | |
| 73 g_return_if_fail(trans != NULL); | |
| 74 | |
| 75 g_queue_push_tail(cmdproc->txqueue, trans); | |
| 76 } | |
| 77 | |
| 78 static void | |
| 79 show_debug_cmd(MsnCmdProc *cmdproc, gboolean incoming, const char *command) | |
| 80 { | |
| 81 MsnServConn *servconn; | |
| 82 const char *names[] = { "NS", "SB" }; | |
| 83 char *show; | |
| 84 char tmp; | |
| 85 size_t len; | |
| 86 | |
| 87 servconn = cmdproc->servconn; | |
| 88 len = strlen(command); | |
| 89 show = g_strdup(command); | |
| 90 | |
| 91 tmp = (incoming) ? 'S' : 'C'; | |
| 92 | |
| 93 if ((show[len - 1] == '\n') && (show[len - 2] == '\r')) | |
| 94 { | |
| 95 show[len - 2] = '\0'; | |
| 96 } | |
| 97 | |
| 98 gaim_debug_misc("msn", "%c: %s %03d: %s\n", tmp, | |
| 99 names[servconn->type], servconn->num, show); | |
| 100 | |
| 101 g_free(show); | |
| 102 } | |
| 103 | |
| 104 void | |
| 105 msn_cmdproc_send_trans(MsnCmdProc *cmdproc, MsnTransaction *trans) | |
| 106 { | |
| 107 MsnServConn *servconn; | |
| 108 char *data; | |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
109 size_t len; |
| 8810 | 110 |
| 111 g_return_if_fail(cmdproc != NULL); | |
| 112 g_return_if_fail(trans != NULL); | |
| 113 | |
| 114 servconn = cmdproc->servconn; | |
| 115 msn_history_add(cmdproc->history, trans); | |
| 116 | |
| 117 data = msn_transaction_to_string(trans); | |
|
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
118 |
| 8810 | 119 cmdproc->last_trans = g_strdup(data); |
| 120 | |
| 121 len = strlen(data); | |
| 122 | |
| 123 show_debug_cmd(cmdproc, FALSE, data); | |
| 124 | |
| 125 if (trans->callbacks == NULL) | |
| 126 trans->callbacks = g_hash_table_lookup(cmdproc->cbs_table->cmds, | |
| 127 trans->command); | |
| 128 | |
| 129 if (trans->payload != NULL) | |
| 130 { | |
| 131 data = g_realloc(data, len + trans->payload_len); | |
| 132 memcpy(data + len, trans->payload, trans->payload_len); | |
| 133 len += trans->payload_len; | |
| 134 } | |
| 135 | |
| 136 msn_servconn_write(servconn, data, len); | |
| 137 | |
| 138 g_free(data); | |
| 139 } | |
| 140 | |
| 141 void | |
| 142 msn_cmdproc_send_quick(MsnCmdProc *cmdproc, const char *command, | |
| 143 const char *format, ...) | |
| 144 { | |
| 145 MsnServConn *servconn; | |
| 146 char *data; | |
|
8830
f8038b1f7449
[gaim-migrate @ 9594]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
147 char *params = NULL; |
| 8810 | 148 va_list arg; |
| 149 size_t len; | |
| 150 | |
| 151 g_return_if_fail(cmdproc != NULL); | |
| 152 g_return_if_fail(command != NULL); | |
| 153 | |
| 154 servconn = cmdproc->servconn; | |
| 155 | |
|
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
156 if (format != NULL) |
|
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
157 { |
|
8830
f8038b1f7449
[gaim-migrate @ 9594]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
158 va_start(arg, format); |
|
f8038b1f7449
[gaim-migrate @ 9594]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
159 params = g_strdup_vprintf(format, arg); |
|
f8038b1f7449
[gaim-migrate @ 9594]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
160 va_end(arg); |
|
f8038b1f7449
[gaim-migrate @ 9594]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
161 } |
| 8810 | 162 |
| 163 if (params != NULL) | |
| 164 data = g_strdup_printf("%s %s\r\n", command, params); | |
| 165 else | |
| 166 data = g_strdup_printf("%s\r\n", command); | |
| 167 | |
| 168 g_free(params); | |
| 169 | |
| 170 len = strlen(data); | |
| 171 | |
| 172 show_debug_cmd(cmdproc, FALSE, data); | |
| 173 | |
| 174 msn_servconn_write(servconn, data, len); | |
| 175 | |
| 176 g_free(data); | |
| 177 } | |
| 178 | |
| 179 void | |
| 180 msn_cmdproc_send(MsnCmdProc *cmdproc, const char *command, | |
| 181 const char *format, ...) | |
| 182 { | |
| 183 MsnTransaction *trans; | |
| 184 va_list arg; | |
| 185 | |
| 186 g_return_if_fail(cmdproc != NULL); | |
| 187 g_return_if_fail(command != NULL); | |
| 188 | |
| 189 trans = g_new0(MsnTransaction, 1); | |
| 190 | |
| 191 trans->command = g_strdup(command); | |
| 192 | |
|
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
193 if (format != NULL) |
|
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
194 { |
|
8830
f8038b1f7449
[gaim-migrate @ 9594]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
195 va_start(arg, format); |
|
f8038b1f7449
[gaim-migrate @ 9594]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
196 trans->params = g_strdup_vprintf(format, arg); |
|
f8038b1f7449
[gaim-migrate @ 9594]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
197 va_end(arg); |
|
f8038b1f7449
[gaim-migrate @ 9594]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
198 } |
| 8810 | 199 |
| 200 msn_cmdproc_send_trans(cmdproc, trans); | |
| 201 } | |
| 202 | |
| 203 void | |
|
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
204 msn_cmdproc_process_payload(MsnCmdProc *cmdproc, char *payload, |
|
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
205 int payload_len) |
|
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
206 { |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
207 MsnCommand *last; |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
208 |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
209 g_return_if_fail(cmdproc != NULL); |
|
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
210 |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
211 last = cmdproc->last_cmd; |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
212 last->payload = g_memdup(payload, payload_len); |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
213 last->payload_len = payload_len; |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
214 |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
215 if (last->payload_cb != NULL) |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
216 last->payload_cb(cmdproc, last, payload, payload_len); |
|
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
217 } |
|
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
218 |
|
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
219 void |
| 8810 | 220 msn_cmdproc_process_msg(MsnCmdProc *cmdproc, MsnMessage *msg) |
| 221 { | |
| 222 MsnMsgCb cb; | |
| 223 | |
| 9881 | 224 if (msn_message_get_content_type(msg) == NULL) |
| 225 { | |
| 226 gaim_debug_misc("msn", "failed to find message content\n"); | |
| 227 return; | |
| 228 } | |
| 229 | |
| 8810 | 230 cb = g_hash_table_lookup(cmdproc->cbs_table->msgs, |
| 231 msn_message_get_content_type(msg)); | |
| 232 | |
| 233 if (cb == NULL) | |
| 234 { | |
|
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
235 gaim_debug_warning("msn", "Unhandled content-type '%s'\n", |
|
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
236 msn_message_get_content_type(msg)); |
| 8810 | 237 |
| 238 return; | |
| 239 } | |
| 240 | |
| 241 cb(cmdproc, msg); | |
| 242 } | |
| 243 | |
| 244 void | |
| 245 msn_cmdproc_process_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) | |
| 246 { | |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
247 MsnTransCb cb = NULL; |
| 8810 | 248 MsnTransaction *trans = NULL; |
| 249 | |
| 250 if (cmd->trId) | |
| 251 trans = msn_history_find(cmdproc->history, cmd->trId); | |
| 252 | |
| 10225 | 253 if (trans != NULL) |
| 254 if (trans->timer) | |
| 255 gaim_timeout_remove(trans->timer); | |
| 256 | |
| 8810 | 257 if (g_ascii_isdigit(cmd->command[0])) |
| 258 { | |
| 259 if (trans != NULL) | |
| 260 { | |
| 261 MsnErrorCb error_cb = NULL; | |
| 262 int error; | |
| 263 | |
| 264 error = atoi(cmd->command); | |
| 10225 | 265 |
| 266 if (trans->error_cb != NULL) | |
| 267 error_cb = trans->error_cb; | |
| 268 | |
| 269 if (error_cb == NULL && cmdproc->cbs_table->errors != NULL) | |
| 8810 | 270 error_cb = g_hash_table_lookup(cmdproc->cbs_table->errors, trans->command); |
| 271 | |
| 272 if (error_cb != NULL) | |
| 10225 | 273 { |
| 8810 | 274 error_cb(cmdproc, trans, error); |
| 10225 | 275 } |
| 8810 | 276 else |
| 277 { | |
| 278 #if 1 | |
| 279 msn_error_handle(cmdproc->session, error); | |
| 280 #else | |
| 281 gaim_debug_warning("msn", "Unhandled error '%s'\n", | |
| 282 cmd->command); | |
| 283 #endif | |
| 284 } | |
| 285 | |
| 286 return; | |
| 287 } | |
| 288 } | |
| 289 | |
| 290 if (cmdproc->cbs_table->async != NULL) | |
| 291 cb = g_hash_table_lookup(cmdproc->cbs_table->async, cmd->command); | |
| 292 | |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
293 if (cb == NULL && trans != NULL) |
| 8810 | 294 { |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
295 cmd->trans = trans; |
| 8810 | 296 |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
297 if (trans->callbacks != NULL) |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
298 cb = g_hash_table_lookup(trans->callbacks, cmd->command); |
| 8810 | 299 } |
| 300 | |
| 10043 | 301 if (cb == NULL && cmdproc->cbs_table->fallback != NULL) |
| 302 cb = g_hash_table_lookup(cmdproc->cbs_table->fallback, cmd->command); | |
| 303 | |
| 8810 | 304 if (cb != NULL) |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
305 { |
| 8810 | 306 cb(cmdproc, cmd); |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
307 } |
| 8810 | 308 else |
| 309 { | |
| 310 gaim_debug_warning("msn", "Unhandled command '%s'\n", | |
|
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8830
diff
changeset
|
311 cmd->command); |
| 8810 | 312 } |
| 313 | |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
314 #if 1 |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
315 /* TODO this is really ugly */ |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
316 /* Since commands have not stored payload and we need it for pendent |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
317 * commands at the time we process again the same command we will try |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
318 * to read again the payload of payload_len size but we will actually |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
319 * read sometime else, and reading from server syncronization goes to |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
320 * hell. */ |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
321 /* Now we store the payload in the command when we queue them :D */ |
| 8810 | 322 |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
323 if (trans != NULL && trans->pendent_cmd != NULL) |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
324 if (cmdproc->ready) |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
325 msn_transaction_unqueue_cmd(trans, cmdproc); |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
326 #endif |
| 8810 | 327 } |
| 328 | |
| 329 void | |
| 330 msn_cmdproc_process_cmd_text(MsnCmdProc *cmdproc, const char *command) | |
| 331 { | |
| 332 show_debug_cmd(cmdproc, TRUE, command); | |
| 333 | |
| 334 if (cmdproc->last_cmd != NULL) | |
| 335 msn_command_destroy(cmdproc->last_cmd); | |
| 336 | |
| 337 cmdproc->last_cmd = msn_command_from_string(command); | |
| 338 | |
| 339 msn_cmdproc_process_cmd(cmdproc, cmdproc->last_cmd); | |
| 340 } | |
| 341 | |
| 342 void | |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
343 msn_cmdproc_show_error(MsnCmdProc *cmdproc, int error) |
| 8810 | 344 { |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
345 GaimConnection *gc = |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
346 gaim_account_get_connection(cmdproc->session->account); |
| 8810 | 347 |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
348 char *tmp; |
| 8810 | 349 |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
350 tmp = NULL; |
| 8810 | 351 |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
352 switch (error) |
| 8810 | 353 { |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
354 case MSN_ERROR_MISC: |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
355 tmp = _("Miscellaneous error"); break; |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
356 case MSN_ERROR_SIGNOTHER: |
| 9641 | 357 gc->wants_to_die = TRUE; |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
358 tmp = _("You have signed on from another location."); break; |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
359 case MSN_ERROR_SERVDOWN: |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
360 tmp = _("The MSN servers are going down temporarily."); break; |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
361 default: |
| 8810 | 362 break; |
| 363 } | |
| 364 | |
|
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
365 if (tmp != NULL) |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
366 { |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
367 gaim_connection_error(gc, tmp); |
|
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
368 } |
| 8810 | 369 } |
