mbbsemu / MBBSEmu

The MajorBBS Emulation Project is an Open Source, Cross-Platform emulator for easily running The MajorBBS & Worldgroup Modules
https://www.mbbsemu.com
MIT License
128 stars 14 forks source link

MBBSEmu - Add `Enabled` Flag to modules.json #429

Closed enusbaum closed 3 years ago

enusbaum commented 3 years ago

This enhancement would add an Enabled flag to the modules.json record for each module enumerated within the JSON file.

Currently the only way an individual is able to remove a module from being loaded from MBBSEmu, they have to remove the entire entry from the modules.json file. This results in multiple different backups/copies in order to not lose configurations that have already been entered but not needed.

A new modules.json file would look like this:

{
  "Modules": [
    {
      "Identifier": "WCCMMUD",
      "Path": "c:\\dos\\modules\\mmud111g\\",
      "Enabled" : 1     
    },{
      "Identifier": "RTSLORD",
      "Path": "c:\\dos\\modules\\lord\\",
      "Enabled" : 0     
    },{
      "Identifier": "MBMGEMP",
      "Path": "c:\\dos\\modules\\ge\\"
    }
  ]
}

In this example, MajorMUD and Galactic Empire are enabled while LORD is disabled.

Absence of the flag results in Enabled being defaulted to 1 (on)

enusbaum commented 3 years ago

The module is still loaded at runtime, but it's not Added to MbbsHost

enusbaum commented 3 years ago

An additional enhancement would be adding a Sysop Command which would enable/add a disabled module to MBBSEmu while running.

/SYS ENABLE <moduleName> would set Enabled to 1 for the module and load it into MbbsHost /SYS DISABLE <moduleName> would set Enabled to 0 for the module and unload it from MbbsHost