Unverified Commit d5ca6dab authored by Hugo "ThePooN" Denizart's avatar Hugo "ThePooN" Denizart Committed by GitHub
Browse files

Merge pull request #13 from KhooHaoYit/master

Check if member exists before emitting it
parents 133aea06 bac0c299
Pipeline #4416 passed with stage
in 54 seconds
......@@ -25,7 +25,8 @@ class PartCommand extends JoinCommand {
* @event BanchoClient#PART
* @type {BanchoChannelMember}
*/
client.emit("PART", channel.channelMembers.get(user.ircUsername));
if(channel.channelMembers.has(user.ircUsername))
client.emit("PART", channel.channelMembers.get(user.ircUsername));
if(user.isClient()) {
channel.joined = false;
channel.channelMembers.clear();
......@@ -36,4 +37,4 @@ class PartCommand extends JoinCommand {
}
}
module.exports = PartCommand;
\ No newline at end of file
module.exports = PartCommand;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment