diff options
author | marzavec <admin@marzavec.com> | 2020-03-12 19:28:20 +0100 |
---|---|---|
committer | marzavec <admin@marzavec.com> | 2020-03-12 19:28:20 +0100 |
commit | 2b6e771383f4c6f392b32ce26e4d759b56791132 (patch) | |
tree | b8c1cefecbd7f5816a3fb5ddc4bdb6bdfe463ba2 /server/src/commands/core/emote.js | |
parent | Merge pull request #96 from MinusGix/fixKickHash (diff) | |
download | hackchat-2b6e771383f4c6f392b32ce26e4d759b56791132.tar.gz hackchat-2b6e771383f4c6f392b32ce26e4d759b56791132.zip |
Protocol Updates and Bug Fixes
Diffstat (limited to '')
-rw-r--r-- | server/src/commands/core/emote.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/commands/core/emote.js b/server/src/commands/core/emote.js index 19a5fbe..21d14d1 100644 --- a/server/src/commands/core/emote.js +++ b/server/src/commands/core/emote.js @@ -22,7 +22,7 @@ const parseText = (text) => { // module main export async function run(core, server, socket, payload) { // check user input - const text = parseText(payload.text); + let text = parseText(payload.text); if (!text) { // lets not send objects or empty text, yea? @@ -38,11 +38,15 @@ export async function run(core, server, socket, payload) { }, socket); } + if (!text.startsWith("'")) { + text = ` ${text}`; + } + const newPayload = { cmd: 'info', type: 'emote', nick: socket.nick, - text: `@${socket.nick} ${text}`, + text: `@${socket.nick}${text}`, }; if (socket.trip) { newPayload.trip = socket.trip; |