From 169bb3ec90496d9bc8fd50e557f7309f593c41ba Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 19 Feb 2010 11:48:49 +0100 Subject: [PATCH] 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. --- backend.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) 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; -- 1.7.0.4