parent
ff72ebbb74
commit
c409328ddf
@ -30,10 +30,10 @@ class Identification {
|
|||||||
var address = server.address();
|
var address = server.address();
|
||||||
log.info(`Identd server available on ${colors.green(address.address + ":" + address.port)}`);
|
log.info(`Identd server available on ${colors.green(address.address + ":" + address.port)}`);
|
||||||
|
|
||||||
startedCallback();
|
startedCallback(this);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
startedCallback();
|
startedCallback(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ var Helper = require("../../helper");
|
|||||||
|
|
||||||
module.exports = function(irc, network) {
|
module.exports = function(irc, network) {
|
||||||
var client = this;
|
var client = this;
|
||||||
var identHandler = this.manager.identHandler;
|
|
||||||
|
|
||||||
network.channels[0].pushMessage(client, new Msg({
|
network.channels[0].pushMessage(client, new Msg({
|
||||||
text: "Network created, connecting to " + network.host + ":" + network.port + "..."
|
text: "Network created, connecting to " + network.host + ":" + network.port + "..."
|
||||||
@ -65,12 +64,12 @@ module.exports = function(irc, network) {
|
|||||||
let identSocketId;
|
let identSocketId;
|
||||||
|
|
||||||
irc.on("raw socket connected", function(socket) {
|
irc.on("raw socket connected", function(socket) {
|
||||||
identSocketId = identHandler.addSocket(socket, client.name || network.username);
|
identSocketId = client.manager.identHandler.addSocket(socket, client.name || network.username);
|
||||||
});
|
});
|
||||||
|
|
||||||
irc.on("socket close", function() {
|
irc.on("socket close", function() {
|
||||||
if (identSocketId > 0) {
|
if (identSocketId > 0) {
|
||||||
identHandler.removeSocket(identSocketId);
|
client.manager.identHandler.removeSocket(identSocketId);
|
||||||
identSocketId = 0;
|
identSocketId = 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -13,7 +13,6 @@ var ldap = require("ldapjs");
|
|||||||
var colors = require("colors/safe");
|
var colors = require("colors/safe");
|
||||||
const Identification = require("./identification");
|
const Identification = require("./identification");
|
||||||
|
|
||||||
let identHandler = null;
|
|
||||||
var manager = null;
|
var manager = null;
|
||||||
var authFunction = localAuth;
|
var authFunction = localAuth;
|
||||||
|
|
||||||
@ -89,7 +88,7 @@ in ${config.public ? "public" : "private"} mode`);
|
|||||||
|
|
||||||
manager = new ClientManager();
|
manager = new ClientManager();
|
||||||
|
|
||||||
identHandler = new Identification(() => {
|
new Identification((identHandler) => {
|
||||||
manager.init(identHandler, sockets);
|
manager.init(identHandler, sockets);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user