commit 35db6dbe47f673e111f3348209350dd76531346f parent c25f564046633197ea2b34ce7813e9e11a8e0b4e Author: Antoine Amarilli <a3nm@a3nm.net> Date: Tue, 10 Mar 2015 20:18:50 +0100 fix wrong reads when matching nick when filtering Diffstat:
irctk.c | | | 7 | +++++-- |
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/irctk.c b/irctk.c @@ -1674,8 +1674,11 @@ void event_channel (irc_session_t *session, const char *event, ok = 0; break; } - if (params[1][offset + len] != ':' && params[1][offset + len] != ' ' && params[1][offset + len] != ',') { - ok = 0; + if (ok) { + // check the nick ends here + char next = params[1][offset + len]; + if (next != ':' && next != ' ' && next != ',') + ok = 0; // nick continues } }