From 54daab2e97fcd9d3f9dc26320000b288a0e5ecc6 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 8 Feb 2010 11:57:57 +0100 Subject: [PATCH] Match handles with multiple titles for channel Chat Boxes Only handles with at most one suffixed 'title', such as (U), (C), (IM) or (TD), followed by the parenthesized channel number, were recognized, so tells by people with more titles always went to the ICS console window. Patterns are added to recognize handles with upto three such qualifiers. --- backend.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index 9e0dad5..7b7df9c 100644 --- a/backend.c +++ b/backend.c @@ -2471,7 +2471,9 @@ read_from_ics(isr, closure, data, count, error) if(started == STARTED_NONE && (looking_at(buf, &i, "* tells you:") || looking_at(buf, &i, "* says:") || looking_at(buf, &i, "* whispers:") || looking_at(buf, &i, "*(*):") && (sscanf(star_match[1], "%d", &channel),1) || - looking_at(buf, &i, "*(*)(*):") && sscanf(star_match[2], "%d", &channel) == 1 )) { + looking_at(buf, &i, "*(*)(*):") && (sscanf(star_match[2], "%d", &channel),1) || + looking_at(buf, &i, "*(*)(*)(*):") && (sscanf(star_match[3], "%d", &channel),1) || + looking_at(buf, &i, "*(*)(*)(*)(*):") && sscanf(star_match[4], "%d", &channel) == 1 )) { int p; sscanf(star_match[0], "%[^(]", talker+1); // strip (C) or (U) off ICS handle chattingPartner = -1; -- 1.7.0.4