From 9b8f8c3f5310b6af15edf8ff933e2d63e05707a7 Mon Sep 17 00:00:00 2001 From: Caleb Date: Thu, 8 Sep 2022 12:13:14 -0400 Subject: Add Sender support --- webAO/client/sender/sendSelf.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 webAO/client/sender/sendSelf.ts (limited to 'webAO/client/sender/sendSelf.ts') diff --git a/webAO/client/sender/sendSelf.ts b/webAO/client/sender/sendSelf.ts new file mode 100644 index 0000000..66c35fa --- /dev/null +++ b/webAO/client/sender/sendSelf.ts @@ -0,0 +1,13 @@ +import { client } from "../../client"; + + +/** + * Hook for sending messages to the client + * @param {string} message the message to send + */ +export const sendSelf = (message: string) => { + (( + document.getElementById("client_ooclog") + )).value += `${message}\r\n`; + client.handleSelf(message); +} \ No newline at end of file -- cgit