2016-10-09 21:14:02 +02:00
|
|
|
"use strict";
|
|
|
|
|
2017-11-10 21:44:14 +01:00
|
|
|
const Msg = require("../../models/msg");
|
2016-04-24 17:12:54 +02:00
|
|
|
|
|
|
|
module.exports = function(irc, network) {
|
2017-11-10 21:44:14 +01:00
|
|
|
const client = this;
|
2016-04-24 17:12:54 +02:00
|
|
|
|
|
|
|
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,
|
2017-11-15 07:35:15 +01:00
|
|
|
params: command.params,
|
2016-09-25 08:41:10 +02:00
|
|
|
}), true);
|
2016-04-24 17:12:54 +02:00
|
|
|
});
|
|
|
|
};
|