forked from ppfun/pixelplanet
APISocket less noisy
This commit is contained in:
parent
0360ba0dc1
commit
95bfcae964
|
@ -164,7 +164,6 @@ class APISocketServer extends WebSocketEvents {
|
|||
}
|
||||
|
||||
async onTextMessage(message, ws) {
|
||||
logger.info(`Got message ${message}`);
|
||||
try {
|
||||
const packet = JSON.parse(message);
|
||||
const command = packet[0];
|
||||
|
@ -183,6 +182,7 @@ class APISocketServer extends WebSocketEvents {
|
|||
if (even == 'online') {
|
||||
ws.subOnline = true;
|
||||
}
|
||||
logger.info(`APISocket client subscribed to ${command}`);
|
||||
return;
|
||||
}
|
||||
if (command == 'setpxl') {
|
||||
|
@ -209,6 +209,7 @@ class APISocketServer extends WebSocketEvents {
|
|||
]));
|
||||
return;
|
||||
}
|
||||
logger.info(`APISocket message ${message}`);
|
||||
if (command == 'login') {
|
||||
const [minecraftid, minecraftname, ip] = packet;
|
||||
const user = await this.mc.report_login(minecraftid, minecraftname);
|
||||
|
|
Loading…
Reference in New Issue
Block a user