blob: cf7f8819ca40253946d01fe388443a91d8af7df5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { safeTags } from "../encoding";
/**
* Handles the kicked packet
* @param {string} type is it a kick or a ban
* @param {string} reason why
*/
export const handleBans = (type: string, reason: string) => {
document.getElementById("client_error_overlay")!.style.display = "flex";
document.getElementById("client_errortext")!.innerHTML =
`${type}:<br>${safeTags(reason).replace(/\n/g, "<br />")}`;
(<HTMLElement>document.getElementById("client_reconnect")).style.display =
"none";
alert(type + ":\r" + reason);
};
|