Fix #153: Do not intercept service commands

This commit is contained in:
Pavel Djundik 2016-03-06 11:04:58 +02:00
parent f3685f7d41
commit 42a7c54c0a
2 changed files with 0 additions and 27 deletions

View File

@ -45,7 +45,6 @@ var inputs = [
"part",
"quit",
"raw",
"services",
"topic",
"whois"
];

View File

@ -1,26 +0,0 @@
var _ = require("lodash");
module.exports = function(network, chan, cmd, args) {
if (cmd !== "ns" && cmd !== "cs" && cmd !== "hs") {
return;
}
var target = ({
"ns": "nickserv",
"cs": "chanserv",
"hs": "hostserv",
})[cmd];
if (!target || args.length === 0 || args[0] === "") {
return;
}
var irc = network.irc;
var msg = args.join(" ");
irc.send(target, msg);
var channel = _.find(network.channels, {name: target});
if (typeof channel !== "undefined") {
irc.emit("message", {
from: irc.me,
to: channel.name,
message: msg
});
}
};