Skip to content

Commit

Permalink
Default quit/part/kick default message as empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
prawnsalad committed Feb 12, 2017
1 parent 1698e7c commit 6654949
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/commands/handlers/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,13 @@ var handlers = {

PART: function(command) {
var time = command.getServerTime();
var channel = command.params[0];
var message;

if (command.params.length > 1) {
message = command.params[command.params.length - 1];
}

this.emit('part', {
nick: command.nick,
ident: command.ident,
hostname: command.hostname,
channel: channel,
message: message,
channel: command.params[0],
message: command.params[command.params.length - 1] || '',
time: time
});
},
Expand All @@ -188,7 +182,7 @@ var handlers = {
ident: command.ident,
hostname: command.hostname,
channel: command.params[0],
message: command.params[command.params.length - 1],
message: command.params[command.params.length - 1] || '',
time: time
});
},
Expand All @@ -201,7 +195,7 @@ var handlers = {
nick: command.nick,
ident: command.ident,
hostname: command.hostname,
message: command.params[command.params.length - 1],
message: command.params[command.params.length - 1] || '',
time: time
});
},
Expand Down

0 comments on commit 6654949

Please sign in to comment.