aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/banPlayer.ts
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2024-08-07 20:49:33 +0200
committerstonedDiscord <Tukz@gmx.de>2024-08-07 20:49:33 +0200
commit73373ce08b060c97fcb6311e862b8261c3222d9f (patch)
treefd35bc89d22dcc0335c7e7ab276a843c69e3e526 /webAO/dom/banPlayer.ts
parent8bbb97917a595ebbd2cef080b3df6cb331193663 (diff)
add ban button
Diffstat (limited to 'webAO/dom/banPlayer.ts')
-rw-r--r--webAO/dom/banPlayer.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/webAO/dom/banPlayer.ts b/webAO/dom/banPlayer.ts
new file mode 100644
index 0000000..a8f6d5a
--- /dev/null
+++ b/webAO/dom/banPlayer.ts
@@ -0,0 +1,14 @@
+import { client } from '../client'
+/**
+ * Tries to ban a player from the playerlist
+ * @param {Number} id the players id
+ */
+export function banPlayer(id: number) {
+ let reason;
+ let length;
+ reason = prompt("Please enter the ban reason", "");
+ length = Number(prompt("Please enter the ban length in hours", ""));
+
+ client.sender.sendMA(id, length, reason);
+}
+window.banPlayer = banPlayer; \ No newline at end of file