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

@ -55,6 +55,14 @@ export class ProtobufService {
this.sendCommand(cmd, (raw) => callback && callback(raw));
}
public sendAdminCommand(adminCmd: number, callback?: Function) {
const cmd = this.controller.CommandContainer.create({
'adminCommand': [adminCmd]
});
this.sendCommand(cmd, (raw) => callback && callback(raw));
}
public sendCommand(cmd: number, callback: Function) {
this.cmdId++;