Merge pull request #2344 from thelounge/xpaw/client-guid
Replace client ids with guids
This commit is contained in:
commit
7d1af273d1
@ -11,10 +11,10 @@ const ircFramework = require("irc-framework");
|
||||
const Helper = require("./helper");
|
||||
const UAParser = require("ua-parser-js");
|
||||
const MessageStorage = require("./plugins/sqlite");
|
||||
const uuidv4 = require("uuid/v4");
|
||||
|
||||
module.exports = Client;
|
||||
|
||||
let id = 0;
|
||||
const events = [
|
||||
"away",
|
||||
"connection",
|
||||
@ -71,7 +71,7 @@ function Client(manager, name, config = {}) {
|
||||
lastActiveChannel: -1,
|
||||
attachedClients: {},
|
||||
config: config,
|
||||
id: id++,
|
||||
id: uuidv4(),
|
||||
name: name,
|
||||
networks: [],
|
||||
sockets: manager.sockets,
|
||||
|
@ -106,7 +106,7 @@ module.exports = function(irc, network) {
|
||||
|
||||
if (Helper.config.debug.ircFramework) {
|
||||
irc.on("debug", function(message) {
|
||||
log.debug("[" + client.name + " (#" + client.id + ") on " + network.name + " (#" + network.id + ")]", message);
|
||||
log.debug("[" + client.name + " (" + client.id + ") on " + network.name + " (#" + network.id + ")]", message);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user