From 6a1a9df0960d9518f9db32ef0b39ec2bedf58020 Mon Sep 17 00:00:00 2001 From: marzavec Date: Mon, 28 Sep 2020 00:52:49 -0500 Subject: [PATCH] Gave emote its own event --- server/src/commands/core/emote.js | 6 +++--- server/src/commands/utility/_Constants.js | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/server/src/commands/core/emote.js b/server/src/commands/core/emote.js index 1939e6f..3e5b781 100644 --- a/server/src/commands/core/emote.js +++ b/server/src/commands/core/emote.js @@ -42,13 +42,13 @@ export async function run({ server, socket, payload }) { text = ` ${text}`; } - // @todo Change `cmd` from `info` to it's own `emote` event const newPayload = { - cmd: 'info', - type: 'emote', + cmd: 'emote', nick: socket.nick, + userid: socket.userid, text: `@${socket.nick}${text}`, }; + if (socket.trip) { newPayload.trip = socket.trip; } diff --git a/server/src/commands/utility/_Constants.js b/server/src/commands/utility/_Constants.js index 1f18aa1..bac25fd 100644 --- a/server/src/commands/utility/_Constants.js +++ b/server/src/commands/utility/_Constants.js @@ -29,6 +29,5 @@ exports.Errors = { Invite: { RATELIMIT: InviteErrors + 1, - INVALID_LENGTH: InviteErrors + 2, }, };