Mercurial > pidgin.yaz
diff 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 |
line wrap: on
line diff
--- a/libpurple/protocols/irc/parse.c Mon May 28 03:18:02 2007 +0000 +++ b/libpurple/protocols/irc/parse.c Mon May 28 17:52:04 2007 +0000 @@ -402,6 +402,22 @@ switch (result[i]) { case '\002': case '\003': + /* Foreground color */ + if (isdigit(result[i + 1])) + i++; + if (isdigit(result[i + 1])) + i++; + /* Optional comma and background color */ + if (result[i + 1] == ',') { + i++; + if (isdigit(result[i + 1])) + i++; + if (isdigit(result[i + 1])) + i++; + } + /* Note that i still points to the last character + * of the color selection string. */ + continue; case '\007': case '\017': case '\026':