thelounge/src/plugins/irc-events/unhandled.js
Jérémie Astori 1dc92d8934
Enforce dangling commas with ESLint
¯\_(ツ)_/¯
2017-11-15 01:35:15 -05:00

21 lines
443 B
JavaScript

"use strict";
var Msg = require("../../models/msg");
module.exports = function(irc, network) {
var client = this;
irc.on("unknown command", function(command) {
// Do not display users own name
if (command.params[0] === network.irc.user.nick) {
command.params.shift();
}
network.channels[0].pushMessage(client, new Msg({
type: Msg.Type.UNHANDLED,
command: command.command,
params: command.params,
}), true);
});
};