console log cleanups

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-01-12 15:42:12 +08:00
parent ac8adfa770
commit db84898803

View File

@ -140,16 +140,16 @@ io.on('connection', (socket) => {
if (typeof data.secret == 'undefined'
|| data.secret == null
|| data.secret === '') {
console.log(`${brown}reveal.js:${reset} secret doesn't match (or is undefined)`);
console.log(`${progname} no secret specified`);
return;
}
if (createHash(data.secret) === data.socketId) {
data.secret = null;
socket.broadcast.emit(data.socketId, data);
console.log(`${brown}reveal.js:${reset} master on ${green}data.socketId${reset}`);
console.log(`${progname} master connected on ${green}data.socketId${reset}`);
}
else {
console.log(`${progname}given secret ${red}${data.secret}${reset} doesn't match`);
console.log(`${progname} given secret ${red}${data.secret}${reset} doesn't match`);
}
});
});