Mercurial > pidgin
comparison src/protocols/msn/switchboard.c @ 6622:a4622f1fb5a1
[gaim-migrate @ 7146]
(10:10:23) Robot101: kills off OPT_CONN_* in favour of an enum, and deprecates all
the IM_FLAGS_* except IM_FLAG_AWAY which is made into GAIM_IM_AUTO_RESP in a
GaimImFlags enum.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 25 Aug 2003 14:12:28 +0000 |
parents | 42fdf16f1dad |
children | 314111e7b601 |
comparison
equal
deleted
inserted
replaced
6621:42fdf16f1dad | 6622:a4622f1fb5a1 |
---|---|
291 { | 291 { |
292 GaimConnection *gc = servconn->session->account->gc; | 292 GaimConnection *gc = servconn->session->account->gc; |
293 MsnSwitchBoard *swboard = servconn->data; | 293 MsnSwitchBoard *swboard = servconn->data; |
294 char *body; | 294 char *body; |
295 const char *value; | 295 const char *value; |
296 int flags = 0; | |
297 | 296 |
298 body = g_strdup(msn_message_get_body(msg)); | 297 body = g_strdup(msn_message_get_body(msg)); |
299 | 298 |
300 gaim_debug(GAIM_DEBUG_INFO, "msn", "Checking User-Agent...\n"); | 299 gaim_debug(GAIM_DEBUG_INFO, "msn", "Checking User-Agent...\n"); |
301 | 300 |
302 if ((value = msn_message_get_attr(msg, "User-Agent")) != NULL) { | 301 if ((value = msn_message_get_attr(msg, "User-Agent")) != NULL) { |
303 gaim_debug(GAIM_DEBUG_MISC, "msn", "value = '%s'\n", value); | 302 gaim_debug(GAIM_DEBUG_MISC, "msn", "value = '%s'\n", value); |
304 if (!g_ascii_strncasecmp(value, "Gaim", 4)) { | |
305 gaim_debug(GAIM_DEBUG_INFO, "msn", "Setting GAIMUSER flag.\n"); | |
306 flags |= IM_FLAG_GAIMUSER; | |
307 } | |
308 } | 303 } |
309 | 304 |
310 if ((value = msn_message_get_attr(msg, "X-MMS-IM-Format")) != NULL) { | 305 if ((value = msn_message_get_attr(msg, "X-MMS-IM-Format")) != NULL) { |
311 char *pre_format, *post_format; | 306 char *pre_format, *post_format; |
312 | 307 |
320 | 315 |
321 if (swboard->chat != NULL) | 316 if (swboard->chat != NULL) |
322 serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(swboard->chat)), | 317 serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(swboard->chat)), |
323 servconn->msg_passport, 0, body, time(NULL)); | 318 servconn->msg_passport, 0, body, time(NULL)); |
324 else | 319 else |
325 serv_got_im(gc, servconn->msg_passport, body, flags, time(NULL), -1); | 320 serv_got_im(gc, servconn->msg_passport, body, 0, time(NULL), -1); |
326 | 321 |
327 g_free(body); | 322 g_free(body); |
328 | 323 |
329 return TRUE; | 324 return TRUE; |
330 } | 325 } |