Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/oscar.c @ 15625:3548e64b0245
Combine two functions that did similar things. This is a little
cleaner, but more importantly it's more extensible.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 12 Feb 2007 08:43:04 +0000 |
parents | 71af5b6209d5 |
children | 2261750cf4e9 |
comparison
equal
deleted
inserted
replaced
15624:71af5b6209d5 | 15625:3548e64b0245 |
---|---|
3603 if (gaim_status_is_available(status)) | 3603 if (gaim_status_is_available(status)) |
3604 message = gaim_status_get_attr_string(status, "message"); | 3604 message = gaim_status_get_attr_string(status, "message"); |
3605 else | 3605 else |
3606 message = NULL; | 3606 message = NULL; |
3607 tmp = gaim_markup_strip_html(message); | 3607 tmp = gaim_markup_strip_html(message); |
3608 aim_srv_setstatusmsg(od, tmp); | 3608 aim_srv_setextrainfo(od, FALSE, 0, TRUE, tmp); |
3609 g_free(tmp); | 3609 g_free(tmp); |
3610 | 3610 |
3611 aim_srv_setidle(od, 0); | 3611 aim_srv_setidle(od, 0); |
3612 | 3612 |
3613 if (od->icq) { | 3613 if (od->icq) { |
4409 else if (!strcmp(status_id, OSCAR_STATUS_ID_INVISIBLE)) | 4409 else if (!strcmp(status_id, OSCAR_STATUS_ID_INVISIBLE)) |
4410 data |= AIM_ICQ_STATE_INVISIBLE; | 4410 data |= AIM_ICQ_STATE_INVISIBLE; |
4411 else if (!strcmp(status_id, OSCAR_STATUS_ID_CUSTOM)) | 4411 else if (!strcmp(status_id, OSCAR_STATUS_ID_CUSTOM)) |
4412 data |= AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY; | 4412 data |= AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY; |
4413 | 4413 |
4414 aim_srv_setextstatus(od, data); | 4414 aim_srv_setextrainfo(od, TRUE, data, FALSE, NULL); |
4415 } | 4415 } |
4416 | 4416 |
4417 static void | 4417 static void |
4418 oscar_set_info_and_status(GaimAccount *account, gboolean setinfo, const char *rawinfo, | 4418 oscar_set_info_and_status(GaimAccount *account, gboolean setinfo, const char *rawinfo, |
4419 gboolean setstatus, GaimStatus *status) | 4419 gboolean setstatus, GaimStatus *status) |
4490 char *tmp = g_utf8_find_prev_char(status_text, &status_text[58]); | 4490 char *tmp = g_utf8_find_prev_char(status_text, &status_text[58]); |
4491 strcpy(tmp, "..."); | 4491 strcpy(tmp, "..."); |
4492 } | 4492 } |
4493 } | 4493 } |
4494 | 4494 |
4495 aim_srv_setstatusmsg(od, status_text); | 4495 aim_srv_setextrainfo(od, FALSE, 0, TRUE, status_text); |
4496 g_free(status_text); | 4496 g_free(status_text); |
4497 | 4497 |
4498 /* This is needed for us to un-set any previous away message. */ | 4498 /* This is needed for us to un-set any previous away message. */ |
4499 away = g_strdup(""); | 4499 away = g_strdup(""); |
4500 } | 4500 } |