hardlounge/src/plugins/inputs/connect.js

23 lines
318 B
JavaScript
Raw Normal View History

exports.commands = ["connect", "server"];
2016-03-06 09:24:56 +00:00
exports.input = function(network, chan, cmd, args) {
if (args.length === 0) {
return;
2014-09-13 21:29:45 +00:00
}
2016-03-06 09:24:56 +00:00
var port = args[1] || "";
var tls = port[0] === "+";
if (tls) {
port = port.substring(1);
}
this.connect({
host: args[0],
port: port,
tls: tls,
});
2016-03-06 09:24:56 +00:00
return true;
2014-09-13 21:29:45 +00:00
};