make personal floppies writable, add success message to myfloppy
This commit is contained in:
parent
459a315143
commit
9c2e2e1f9a
1 changed files with 6 additions and 3 deletions
|
@ -194,9 +194,11 @@ class HelperBot extends CollabVMClient {
|
|||
else this.QemuChangeDevice("vm.cd", source, opts);
|
||||
}
|
||||
|
||||
QemuChangeFloppy(source: string) {
|
||||
QemuChangeFloppy(source: string, readOnly: boolean = true) {
|
||||
let opts = "raw";
|
||||
if (readOnly) opts += " read-only";
|
||||
if (this._hasFloppy)
|
||||
this.QemuChangeDevice("vm.floppy", source, "raw read-only");
|
||||
this.QemuChangeDevice("vm.floppy", source, opts);
|
||||
}
|
||||
|
||||
OnChat(username: string, message: string) {
|
||||
|
@ -538,7 +540,8 @@ class HelperBot extends CollabVMClient {
|
|||
if (!fs.existsSync(flppath)) {
|
||||
fs.writeFileSync(flppath, blankflp);
|
||||
}
|
||||
this.QemuChangeFloppy(flppath);
|
||||
this.QemuChangeFloppy(flppath, false);
|
||||
this.Chat("Tried to put media into specified device.");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue