Webatrice admin commands (#5051)

* Add AdminCommand.updateServerMessage

* Add AdminCommand.shutdownServer

* Add AdminCommand.reloadConfig

* Cleanup

* Add AdminCommand.adjustMod

* Lint

* Lint
This commit is contained in:
Zach H 2024-06-12 22:52:40 -04:00 committed by GitHub
parent e45c4042fe
commit 34d70980e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 167 additions and 0 deletions

View file

@ -0,0 +1,19 @@
import { AdminCommands } from 'websocket';
export default class AdminService {
static adjustMod(userName: string, shouldBeMod?: boolean, shouldBeJudge?: boolean): void {
AdminCommands.adjustMod(userName, shouldBeMod, shouldBeJudge);
}
static reloadConfig(): void {
AdminCommands.reloadConfig();
}
static shutdownServer(reason: string, minutes: number): void {
AdminCommands.shutdownServer(reason, minutes);
}
static updateServerMessage(): void {
AdminCommands.updateServerMessage();
}
}

View file

@ -1,3 +1,4 @@
export { default as AdminService } from './AdminService';
export { default as AuthenticationService } from './AuthenticationService';
export { default as ModeratorService } from './ModeratorService';
export { default as RoomsService } from './RoomsService';