From 09e509c1c857200c42706d9870bf870bde9384f0 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Fri, 15 May 2015 10:10:28 +0300 Subject: [PATCH] Fix channel user modes on Twitch IRC (closes #364) --- lib/irc.js | 4 +++- package.json | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/irc.js b/lib/irc.js index b9159b25..127a56e9 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -275,7 +275,9 @@ function Client(server, nick, opt) { self.emit('+mode', message.args[0], message.nick, mode, user, message); } else { - channel.users[user] = channel.users[user].replace(self.prefixForMode[mode], ''); + if (channel.users[user]) + channel.users[user] = channel.users[user].replace(self.prefixForMode[mode], ''); + self.emit('-mode', message.args[0], message.nick, mode, user, message); } } diff --git a/package.json b/package.json index 62c4d414..133a4bd2 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "Justin Gallardo ", "Chris Nehren ", "Henri Niemeläinen ", - "Alex Miles " + "Alex Miles ", + "Simmo Saan " ], "repository": { "type": "git",