cocodelabs / znc-palaver

ZNC module for push notifications
MIT License
112 stars 14 forks source link

Plugin doesn't work when nick contains special characters #30

Closed MooBaloo closed 9 years ago

MooBaloo commented 9 years ago

When using this plugin and a nick that contains certain special characters such as [ and ], the push notification will fail to trigger when the nick is mentioned in a chat room. I suspect the characters would need to be escaped somewhere in the code.

The PMs and other keywords manually configured in the app still come through, though.

kylef commented 9 years ago

@MooBaloo This should work in the latest version of the module (1.0.1), can you update and try again please.

MooBaloo commented 9 years ago

Still doesn't work. I can get notifications when I use a nick like Test-123, but not when I use Test[123].

kylef commented 9 years ago

Alright, I've figured out the problem @MooBaloo. The module does word-boundary matching so that if you nick was Carl it would match for Carl and Carl's and Carl: but it wouldn't match Carlos which contains Carl since there isn't a "word-boundary". Unfortunately your nick, containing a square bracket [ ] contains a word boundary itself.

I've pushed an update to the module to disable this logic when the nick name includes a word boundary such as [ or ].

MooBaloo commented 9 years ago

Good stuff. Everything works perfect now. Thanks!