Fix #153: Do not intercept service commands
This commit is contained in:
parent
f3685f7d41
commit
42a7c54c0a
@ -45,7 +45,6 @@ var inputs = [
|
||||
"part",
|
||||
"quit",
|
||||
"raw",
|
||||
"services",
|
||||
"topic",
|
||||
"whois"
|
||||
];
|
||||
|
@ -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
|
||||
});
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user