comparison libpurple/protocols/irc/parse.c @ 17426:82a02dbf2fa2

This performs mIRC formatting code stripping for the room list, as well as fixing (I think) mIRC color code stripping for all purposes. I haven't tested this carefully, so someone scream if it breaks anything. Fixes #557
author Ethan Blanton <elb@pidgin.im>
date Mon, 28 May 2007 17:52:04 +0000
parents 25ef7db38f28
children 44b4e8bd759b e556eb2f38d2
comparison
equal deleted inserted replaced
17425:58a286e231b7 17426:82a02dbf2fa2
400 400
401 for (i = 0, j = 0; result[i]; i++) { 401 for (i = 0, j = 0; result[i]; i++) {
402 switch (result[i]) { 402 switch (result[i]) {
403 case '\002': 403 case '\002':
404 case '\003': 404 case '\003':
405 /* Foreground color */
406 if (isdigit(result[i + 1]))
407 i++;
408 if (isdigit(result[i + 1]))
409 i++;
410 /* Optional comma and background color */
411 if (result[i + 1] == ',') {
412 i++;
413 if (isdigit(result[i + 1]))
414 i++;
415 if (isdigit(result[i + 1]))
416 i++;
417 }
418 /* Note that i still points to the last character
419 * of the color selection string. */
420 continue;
405 case '\007': 421 case '\007':
406 case '\017': 422 case '\017':
407 case '\026': 423 case '\026':
408 case '\037': 424 case '\037':
409 continue; 425 continue;