aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/sender/sendSelf.ts
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-09-08 23:15:22 +0200
committerGitHub <noreply@github.com>2022-09-08 23:15:22 +0200
commit23d4ef48f894adf601039fe574a0e7dfe918a105 (patch)
treeab70772728eae88c12f0f519304bfb26608c0932 /webAO/client/sender/sendSelf.ts
parent4de6b4fd4e7bc3871d76fded0f32561c814ca003 (diff)
parent9b8f8c3f5310b6af15edf8ff933e2d63e05707a7 (diff)
Merge pull request #171 from caleb-mabry/beginSender
Grouping Sending Functions
Diffstat (limited to 'webAO/client/sender/sendSelf.ts')
-rw-r--r--webAO/client/sender/sendSelf.ts13
1 files changed, 13 insertions, 0 deletions
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) => {
+ (<HTMLInputElement>(
+ document.getElementById("client_ooclog")
+ )).value += `${message}\r\n`;
+ client.handleSelf(message);
+} \ No newline at end of file