1
0
mirror of https://github.com/hack-chat/main.git synced 2024-03-22 13:20:33 +08:00

Gave emote its own event

This commit is contained in:
marzavec 2020-09-28 00:52:49 -05:00
parent 96eacd92b1
commit 6a1a9df096
2 changed files with 3 additions and 4 deletions

View File

@ -42,13 +42,13 @@ export async function run({ server, socket, payload }) {
text = ` ${text}`; text = ` ${text}`;
} }
// @todo Change `cmd` from `info` to it's own `emote` event
const newPayload = { const newPayload = {
cmd: 'info', cmd: 'emote',
type: 'emote',
nick: socket.nick, nick: socket.nick,
userid: socket.userid,
text: `@${socket.nick}${text}`, text: `@${socket.nick}${text}`,
}; };
if (socket.trip) { if (socket.trip) {
newPayload.trip = socket.trip; newPayload.trip = socket.trip;
} }

View File

@ -29,6 +29,5 @@ exports.Errors = {
Invite: { Invite: {
RATELIMIT: InviteErrors + 1, RATELIMIT: InviteErrors + 1,
INVALID_LENGTH: InviteErrors + 2,
}, },
}; };