mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-06 20:06:44 +00:00
Improve ingame moderation for admins (#3678)
## Description: Players with the `admin` flare can now kick players from any game (including public lobbies), not just the lobby creator in private lobbies. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: w.o.n
This commit is contained in:
@@ -401,7 +401,6 @@ export async function startWorker() {
|
||||
return;
|
||||
}
|
||||
|
||||
let roles: string[] | undefined;
|
||||
let flares: string[] | undefined;
|
||||
|
||||
const allowedFlares = config.allowedFlares();
|
||||
@@ -422,7 +421,6 @@ export async function startWorker() {
|
||||
ws.close(1002, "Unauthorized: user me fetch failed");
|
||||
return;
|
||||
}
|
||||
roles = result.response.player.roles;
|
||||
flares = result.response.player.flares;
|
||||
|
||||
if (allowedFlares !== undefined) {
|
||||
@@ -484,7 +482,7 @@ export async function startWorker() {
|
||||
generateID(),
|
||||
persistentId,
|
||||
claims,
|
||||
roles,
|
||||
claims?.role ?? null,
|
||||
flares,
|
||||
ip,
|
||||
censoredUsername,
|
||||
|
||||
Reference in New Issue
Block a user