Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/irc.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function Client(server, nick, opt) {
realName: 'nodeJS IRC client',
port: 6667,
localAddress: null,
existingSocket: null,
debug: false,
showErrors: false,
autoRejoin: false,
Expand Down Expand Up @@ -792,6 +793,11 @@ Client.prototype.connect = function(retryCount, callback) {
util.log(self.conn.authorizationError);
}
});
} else if (self.opt.existingSocket) {
// must be an already connected socket, e.g. from socks proxy
self.conn = self.opt.existingSocket;
// call connection handler asynchronously, emulating connection success
setTimeout(self._connectionHandler.bind(self), 0);
} else {
self.conn = net.createConnection(connectionOpts, self._connectionHandler.bind(self));
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"Chris Nehren <[email protected]>",
"Henri Niemeläinen <[email protected]>",
"Alex Miles <[email protected]>",
"Simmo Saan <[email protected]>"
"Simmo Saan <[email protected]>",
"e-neko <[email protected]>"
],
"repository": {
"type": "git",
Expand Down