Make sure unhandled command has params
This commit is contained in:
parent
1b38e6cc02
commit
4765f06940
@ -8,6 +8,7 @@ module.exports = function(irc, network) {
|
||||
irc.on("unknown command", function(command) {
|
||||
let target = network.channels[0];
|
||||
|
||||
if (command.params.length > 0) {
|
||||
// Do not display users own name
|
||||
if (command.params[0] === network.irc.user.nick) {
|
||||
command.params.shift();
|
||||
@ -20,6 +21,7 @@ module.exports = function(irc, network) {
|
||||
target = channel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
target.pushMessage(client, new Msg({
|
||||
type: Msg.Type.UNHANDLED,
|
||||
|
Loading…
Reference in New Issue
Block a user