diff options
| author | stonedDiscord <Tukz@gmx.de> | 2023-11-24 17:45:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-24 17:45:33 +0100 |
| commit | 81f2c7a864c1b3779dafa7e6ed4bc6c0dabd35da (patch) | |
| tree | 5f12fa043db2ac2ecae657137376f377ff741aca /webAO/packets/handlers/handleMS.ts | |
| parent | 0bde1984c08414688554dedfd5714a343dfbf76c (diff) | |
| parent | a1b7ec16b3cfb9e4ac0f61ed74269416cd63475a (diff) | |
Merge pull request #204 from Troid-Tech/hide-chatbox-on-blankpost
Hide chatbox on blankpost
Diffstat (limited to 'webAO/packets/handlers/handleMS.ts')
| -rw-r--r-- | webAO/packets/handlers/handleMS.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/webAO/packets/handlers/handleMS.ts b/webAO/packets/handlers/handleMS.ts index 8464942..1c30d55 100644 --- a/webAO/packets/handlers/handleMS.ts +++ b/webAO/packets/handlers/handleMS.ts @@ -78,7 +78,7 @@ export const handleMS = (args: string[]) => { speed: UPDATE_INTERVAL, }; - if (args.length>16) { + if (args.length > 16) { const extra_cccc = { showname: prepChat(args[16]), other_charid: Number(args[17]), @@ -91,7 +91,7 @@ export const handleMS = (args: string[]) => { }; chatmsg = Object.assign(extra_cccc, chatmsg); - if (args.length>24) { + if (args.length > 24) { const extra_27 = { looping_sfx: Number(args[24]), screenshake: Number(args[25]), @@ -101,7 +101,7 @@ export const handleMS = (args: string[]) => { }; chatmsg = Object.assign(extra_27, chatmsg); - if (args.length>29) { + if (args.length > 29) { const extra_28 = { additive: Number(args[29]), effects: args[30].split("|"), @@ -159,6 +159,8 @@ export const handleMS = (args: string[]) => { if (chatmsg.content.trim() === "") { //blankpost chatmsg.content = ""; + // empty string as chatbox means hide it + chatmsg.chatbox = ""; } // our own message appeared, reset the buttons @@ -169,4 +171,4 @@ export const handleMS = (args: string[]) => { handle_ic_speaking(chatmsg); // no await } } -}
\ No newline at end of file +} |
