diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-18 11:56:30 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-18 11:56:30 +0200 |
commit | 4c3f4b1093b1cc4429f7f22069e565c372bab32b (patch) | |
tree | e78c50a163e6e4ecc00bbb2b54a088a15f0a42bc /gateway | |
parent | :sparkles: add default_auto_archive_duration to channel (diff) | |
download | server-4c3f4b1093b1cc4429f7f22069e565c372bab32b.tar.xz |
:loud_sound: opcode logger
Diffstat (limited to 'gateway')
-rw-r--r-- | gateway/src/events/Message.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gateway/src/events/Message.ts b/gateway/src/events/Message.ts index 0a3979c4..a8bf5d78 100644 --- a/gateway/src/events/Message.ts +++ b/gateway/src/events/Message.ts @@ -4,7 +4,7 @@ try { erlpack = require("erlpack"); } catch (error) {} import OPCodeHandlers from "../opcodes"; -import { Payload, CLOSECODES } from "../util/Constants"; +import { Payload, CLOSECODES, OPCODES } from "../util/Constants"; import { instanceOf, Tuple } from "lambert-server"; import { check } from "../opcodes/instanceOf"; import WS from "ws"; @@ -29,13 +29,13 @@ export async function Message(this: WebSocket, buffer: WS.Data) { // @ts-ignore const OPCodeHandler = OPCodeHandlers[data.op]; if (!OPCodeHandler) { - console.error("Unknown_opcode: " + data.op); + console.error("[Gateway] Unkown opcode " + data.op); // TODO: if all opcodes are implemented comment this out: // this.close(CLOSECODES.Unknown_opcode); return; } - console.log("got: " + OPCodeHandler.name); + console.log("[Gateway] Opcode " + OPCODES[data.op]); try { return await OPCodeHandler.call(this, data); |