make the snapshots config value actually work oops
This commit is contained in:
@@ -45,7 +45,8 @@ export default class QEMUVM extends EventEmitter {
|
||||
this.qmpSock = `${Config.vm.qmpSockDir}collab-vm-qmp-${Config.collabvm.node}.sock`;
|
||||
}
|
||||
this.vncPort = Config.vm.vncPort;
|
||||
this.qemuCmd = `${Config.vm.qemuArgs} -snapshot -no-shutdown -vnc 127.0.0.1:${this.vncPort - 5900} -qmp ${this.qmpType}${this.qmpSock},server`;
|
||||
this.qemuCmd = `${Config.vm.qemuArgs} -no-shutdown -vnc 127.0.0.1:${this.vncPort - 5900} -qmp ${this.qmpType}${this.qmpSock},server`;
|
||||
if (Config.vm.snapshots) this.qemuCmd += " -snapshot"
|
||||
this.qmpErrorLevel = 0;
|
||||
this.vncErrorLevel = 0;
|
||||
this.vncOpen = true;
|
||||
|
||||
@@ -188,7 +188,7 @@ export default class WSServer {
|
||||
return;
|
||||
}
|
||||
client.connectedToNode = true;
|
||||
client.sendMsg(guacutils.encode("connect", "1", "1", "1", "0"));
|
||||
client.sendMsg(guacutils.encode("connect", "1", "1", this.Config.vm.snapshots ? "1" : "0", "0"));
|
||||
if (this.ChatHistory.size !== 0) client.sendMsg(this.getChatHistoryMsg());
|
||||
if (this.Config.collabvm.motd) client.sendMsg(guacutils.encode("chat", "", this.Config.collabvm.motd));
|
||||
client.sendMsg(guacutils.encode("size", "0", this.VM.framebuffer.width.toString(), this.VM.framebuffer.height.toString()));
|
||||
@@ -272,6 +272,7 @@ export default class WSServer {
|
||||
this.VM.vnc.keyEvent(keysym, down);
|
||||
break;
|
||||
case "vote":
|
||||
if (!this.Config.vm.snapshots) return;
|
||||
if (!this.turnsAllowed) return;
|
||||
if (!client.connectedToNode) return;
|
||||
if (msgArr.length !== 2) return;
|
||||
|
||||
Reference in New Issue
Block a user