aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/sender/sendMusicChange.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/client/sender/sendMusicChange.ts')
-rw-r--r--webAO/client/sender/sendMusicChange.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/webAO/client/sender/sendMusicChange.ts b/webAO/client/sender/sendMusicChange.ts
index 69cba58..328e997 100644
--- a/webAO/client/sender/sendMusicChange.ts
+++ b/webAO/client/sender/sendMusicChange.ts
@@ -1,9 +1,12 @@
import { client } from "../../client";
+import { escapeChat } from "../../encoding";
/**
* Requests to change the music to the specified track.
* @param {string} track the track ID
*/
export const sendMusicChange = (track: string) => {
- client.sender.sendServer(`MC#${track}#${client.charID}#%`);
+ const showname = escapeChat((<HTMLInputElement>document.getElementById("ic_chat_name")).value);
+ const flags = 0;
+ client.sender.sendServer(`MC#${track}#${client.charID}#${showname}#${flags}#%`);
};