diff options
| author | stonedDiscord <Tukz@gmx.de> | 2024-08-12 13:40:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-12 13:40:47 +0200 |
| commit | 2039178b0f4550534ea6cca1efe64e2a6e4e901d (patch) | |
| tree | 880b7290ed18b2eb8fb38dc8a39b5ad0ca234e58 /webAO/dom | |
| parent | 1a32ea5886de62a495e6fcc65b3d270f9bd84cce (diff) | |
| parent | dc85197c9b966105813dd026480f9f6bc77d8b68 (diff) | |
Merge pull request #225 from AttorneyOnline/playerlist
Playerlist
Diffstat (limited to 'webAO/dom')
| -rw-r--r-- | webAO/dom/banPlayer.ts | 14 | ||||
| -rw-r--r-- | webAO/dom/window.ts | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/webAO/dom/banPlayer.ts b/webAO/dom/banPlayer.ts new file mode 100644 index 0000000..5a8894a --- /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", "Being annoying"); + length = Number(prompt("Please enter the ban length in minutes", "60")); + + client.sender.sendMA(id, length, reason); +} +window.banPlayer = banPlayer;
\ No newline at end of file diff --git a/webAO/dom/window.ts b/webAO/dom/window.ts index 3215b89..f2cd86c 100644 --- a/webAO/dom/window.ts +++ b/webAO/dom/window.ts @@ -26,7 +26,7 @@ declare global { editEvidence: () => void; addEvidence: () => void; pickEvidence: (evidence: any) => void; - pickEmotion: (emo: any) => void; + pickEmotion: (emo: number) => void; pickChar: (ccharacter: any) => void; chartable_filter: (_event: any) => void; ReconnectButton: (_event: any) => void; @@ -52,6 +52,7 @@ declare global { onEnter: (event: any) => void; onReplayGo: (_event: any) => void; onOOCEnter: (_event: any) => void; + banPlayer: (id: number) => void; hcallback: (_event: any) => void; } } |
