2016-10-09 19:14:02 +00:00
|
|
|
"use strict";
|
|
|
|
|
2016-04-24 15:12:54 +00:00
|
|
|
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
|
2016-09-25 06:41:10 +00:00
|
|
|
}), true);
|
2016-04-24 15:12:54 +00:00
|
|
|
});
|
|
|
|
};
|