commit
45ad829499
@ -7,8 +7,9 @@ module.exports = {
|
|||||||
realname: "http://github.com/erming/shout",
|
realname: "http://github.com/erming/shout",
|
||||||
},
|
},
|
||||||
networks: [{
|
networks: [{
|
||||||
host: "irc.freenode.org",
|
host: "chat.freenode.net",
|
||||||
port: 6667,
|
port: 6697,
|
||||||
|
tls: true,
|
||||||
onConnect: {
|
onConnect: {
|
||||||
commands: [""],
|
commands: [""],
|
||||||
join: [
|
join: [
|
||||||
|
@ -5,6 +5,7 @@ var http = require("connect");
|
|||||||
var io = require("socket.io");
|
var io = require("socket.io");
|
||||||
var irc = require("slate-irc");
|
var irc = require("slate-irc");
|
||||||
var net = require("net");
|
var net = require("net");
|
||||||
|
var tls = require("tls");
|
||||||
|
|
||||||
// Models
|
// Models
|
||||||
|
|
||||||
@ -92,11 +93,12 @@ function connect(params) {
|
|||||||
|
|
||||||
var host = params.host;
|
var host = params.host;
|
||||||
var port = params.port || 6667;
|
var port = params.port || 6667;
|
||||||
|
var options = {
|
||||||
var stream = net.connect({
|
|
||||||
port: port,
|
|
||||||
host: host,
|
host: host,
|
||||||
});
|
port: port,
|
||||||
|
};
|
||||||
|
|
||||||
|
var stream = params.tls ? tls.connect(options) : net.connect(options);
|
||||||
|
|
||||||
stream.on("error", function(e) {
|
stream.on("error", function(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user