mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
Webatrice admin commands (#5051)
* Add AdminCommand.updateServerMessage * Add AdminCommand.shutdownServer * Add AdminCommand.reloadConfig * Cleanup * Add AdminCommand.adjustMod * Lint * Lint
This commit is contained in:
parent
e45c4042fe
commit
34d70980e8
11 changed files with 167 additions and 0 deletions
|
|
@ -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++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue