# HG changeset patch # User Daniel Lj # Date 1233711035 0 # Node ID 8f544de623308575933b6e626f28372c4b7d39d4 # Parent e3183dab880ada3244eea15391f646c3d53cac7d Patch to properly publish status messages for statuses other than Available. Fixes #582. committer: John Bailey diff -r e3183dab880a -r 8f544de62330 libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Tue Feb 03 22:06:21 2009 +0000 +++ b/libpurple/protocols/oscar/oscar.c Wed Feb 04 01:30:35 2009 +0000 @@ -4782,7 +4782,7 @@ if (status_html != NULL) { status_text = purple_markup_strip_html(status_html); - /* If the status_text is longer than 60 character then truncate it */ + /* If the status_text is longer than 251 characters then truncate it */ if (strlen(status_text) > MAXAVAILMSGLEN) { char *tmp = g_utf8_find_prev_char(status_text, &status_text[MAXAVAILMSGLEN - 2]); @@ -4799,9 +4799,28 @@ } else { + char *status_text = NULL; + htmlaway = purple_status_get_attr_string(status, "message"); if ((htmlaway == NULL) || (*htmlaway == '\0')) htmlaway = purple_status_type_get_name(status_type); + + /* ICQ 6.x seems to use an available message for all statuses so set one */ + if (od->icq) + { + status_text = purple_markup_strip_html(htmlaway); + /* If the status_text is longer than 251 characters then truncate it */ + if (strlen(status_text) > MAXAVAILMSGLEN) + { + char *tmp = g_utf8_find_prev_char(status_text, &status_text[MAXAVAILMSGLEN - 2]); + strcpy(tmp, "..."); + } + aim_srv_setextrainfo(od, FALSE, 0, TRUE, status_text, NULL); + } + g_free(status_text); + + /* Set a proper away message for icq too so that they work for old third party clients */ + away = purple_prpl_oscar_convert_to_infotext(htmlaway, &awaylen, &away_encoding); if (awaylen > od->rights.maxawaymsglen)