Changed gather kick method to log only the kicked user's id instead of their username, username not immediately available and too lazy to figure out where to find it (#122)

This commit is contained in:
ArturPhilibin 2018-12-15 14:44:44 +00:00 committed by Absurdon
parent efaa7ae94f
commit 23c96196f8

View file

@ -165,10 +165,11 @@ module.exports = function (namespace) {
if (data.gatherer) {
// Remove gatherer defined by ID (admins only)
if (!socket._user.isGatherAdmin()) return;
removeGatherer(gather, { id: data.gatherer, cooldown: true });
let adminName = socket._user.username;
let playerName = data.gatherer.user.username;
winston.info(`Admin removal: ${adminName} removed ${playerName} from the gather.`);
removeGatherer(gather, { id: data.gatherer, cooldown: true });
let adminName = socket._user.username;
let playerId = data.gatherer;
winston.info(`Admin removal: ${adminName} removed ${playerId} from the gather.`);
} else {
// Remove gatherer attached to socket
removeGatherer(gather, socket._user);