From 71ea7e98a1e68c5a51b0a36e662a95d07a04a3d7 Mon Sep 17 00:00:00 2001 From: Daniel Landau Date: Wed, 9 Nov 2016 21:27:11 +0200 Subject: Handle modechars properly Never strip out modechars unless we are explicitly trying to parse a nickname with modechars, i.e., atom 'C' --- src/idle-parser.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/idle-parser.c b/src/idle-parser.c index 2d0ec17..b0cab94 100644 --- a/src/idle-parser.c +++ b/src/idle-parser.c @@ -519,8 +519,12 @@ static gboolean _parse_atom(IdleParser *parser, GValueArray *arr, char atom, con gchar modechar = '\0'; /* Channel names can start with a '!', so don't strip that - * (https://tools.ietf.org/html/rfc2811#section-3.2) */ - if (atom != 'r' && idle_muc_channel_is_modechar(token[0])) { + * (https://tools.ietf.org/html/rfc2811#section-3.2), not + * even when expecting a nickname (without mode chars) as + * that ends up for example messing up PRIMSG handling and + * showing the same message as both a channel and a private + * message */ + if (atom == 'C' && idle_muc_channel_is_modechar(token[0])) { modechar = token[0]; token++; } -- cgit v1.2.3