From: Jack Allnutt Date: Sat, 28 Sep 2013 16:52:25 +0000 (+0100) Subject: Fix code that ignores capability modifiers X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d8b0ca686ec45cb3e2b02f7051af3aef0b639428;p=KiwiIRC.git Fix code that ignores capability modifiers No longer remove a '-' from the middle of a capability name --- diff --git a/server/irc/commands.js b/server/irc/commands.js index 4778c9e..e37d454 100644 --- a/server/irc/commands.js +++ b/server/irc/commands.js @@ -539,7 +539,7 @@ handlers = { 'CAP': function (command) { // TODO: capability modifiers // i.e. - for disable, ~ for requires ACK, = for sticky - var capabilities = command.trailing.replace(/[\-~=]/, '').split(' '); + var capabilities = command.trailing.replace(/(?:^| )[\-~=]/, '').split(' '); var request; // Which capabilities we want to enable