diff --git a/src/index.ts b/src/index.ts index e49d773..d361c61 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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: