Fri, 25 Oct 2024 02:38:45 -0500
Finally add proper support for italics on IRC
Testing Done:
Compiled only.
Bugs closed: PIDGIN-14560
Reviewed at https://reviews.imfreedom.org/r/3609/
| COPYRIGHT | file | annotate | diff | comparison | revisions | |
| libpurple/protocols/irc/parse.c | file | annotate | diff | comparison | revisions |
--- a/COPYRIGHT Fri Oct 25 02:36:52 2024 -0500 +++ b/COPYRIGHT Fri Oct 25 02:38:45 2024 -0500 @@ -369,6 +369,7 @@ Mihály Mészáros Robert Mibus David Michael +Oliver Middleton Lars T. Mikkelsen Mantas Mikulėnas Benjamin Miller
--- a/libpurple/protocols/irc/parse.c Fri Oct 25 02:36:52 2024 -0500 +++ b/libpurple/protocols/irc/parse.c Fri Oct 25 02:38:45 2024 -0500 @@ -389,7 +389,7 @@ cur = string; do { - end = strpbrk(cur, "\002\003\007\017\026\037"); + end = strpbrk(cur, "\002\003\007\017\026\035\037"); decoded = g_string_append_len(decoded, cur, (end ? (gssize)(end - cur) : (gssize)strlen(cur))); cur = end ? end : cur + strlen(cur); @@ -438,7 +438,7 @@ decoded = g_string_append_c(decoded, '>'); } break; - case '\011': + case '\035': cur++; if (!italic) { decoded = g_string_append(decoded, "<I>"); @@ -496,7 +496,6 @@ for (i = 0, j = 0; result[i]; i++) { switch (result[i]) { - case '\002': case '\003': /* Foreground color */ if (isdigit(result[i + 1])) @@ -514,9 +513,11 @@ /* Note that i still points to the last character * of the color selection string. */ continue; + case '\002': case '\007': case '\017': case '\026': + case '\035': case '\037': continue; default: