aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/banPlayer.ts
diff options
context:
space:
mode:
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