From: H.G. Muller Date: Fri, 19 Feb 2010 10:48:49 +0000 (+0100) Subject: Let the sounds sound on receiving a message in a Chat Box X-Git-Tag: master-20100221~12 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=169bb3ec90496d9bc8fd50e557f7309f593c41ba;p=xboard.git Let the sounds sound on receiving a message in a Chat Box Use Colorize() to the applicable color to trigger the sound, and then restore the original color as 'continuation', to do it silently. --- diff --git a/backend.c b/backend.c index 206676d..e2dddbc 100644 --- a/backend.c +++ b/backend.c @@ -2755,6 +2755,7 @@ read_from_ics(isr, closure, data, count, error) for(p=0; p') // shout, c-shout or it; look if there is a 'shouts' chatbox for(p=0; p') { talker[0] = '<'; strcat(talker, "> "); } - else if(buf[i-8] == '-') { talker[0] = '('; strcat(talker, ") "); } - else { talker[0] = '['; strcat(talker, "] "); } + if(buf[oldi+2] == '>') { talker[0] = '<'; strcat(talker, "> "); Colorize(ColorShout, FALSE); } + else if(buf[i-8] == '-') { talker[0] = '('; strcat(talker, ") "); Colorize(ColorSShout, FALSE); } + else { talker[0] = '['; strcat(talker, "] "); Colorize(ColorShout, FALSE); } chattingPartner = p; break; } } if(chattingPartner<0) // if not, look if there is a chatbox for this indivdual for(p=0; p 0 && buf[oldi-1] == '\n') oldi--; if (oldi > next_out) SendToPlayer(&buf[next_out], oldi - next_out); started = STARTED_COMMENT;