diff --git a/aard_inventory.xml b/aard_inventory.xml index 79ec556..bf0dd6b 100644 --- a/aard_inventory.xml +++ b/aard_inventory.xml @@ -542,7 +542,7 @@ Feature Wishlist @w") + dbot.print("@W " .. pluginNameCmd .. + " backup @G[on | off | list | create | delete | restore] @w") end -- inv.cli.backup.usage @@ -3568,6 +3580,9 @@ The plugin creates automatic backups for all of your plugin data. It also gives you the ability to create manual backups at any time. By default, the plugin keeps 4 automatic backups. +By default, automatic backups are enabled. You can enable or disable the +automatic backups with "@Gdinv backup on@W" or "@Gdinv backup off@W". + Most automatic backup systems rotate all previous automatic backups when a new backup is created. In other words, if you have automatic backups 1, 2, 3, and 4 and then create a new backup, the previous backup #1 would become #2, the old #2 @@ -5632,7 +5647,7 @@ function inv.items.refresh(maxNumItems, refreshLocations, endTag, tagProxy) -- the build. The main concern is that we don't want an auto-refresh to -- clog up the system for several minutes without warning the first time the -- user enables this plugin. - if (inv.config.table.buildExecuted == false) then + if (inv.config.table.isBuildExecuted == false) then dbot.print( [[@W You must perform at least one manual inventory build before we allow inventory refresh @@ -5877,7 +5892,7 @@ function inv.items.build(endTag) return inv.tags.stop(invTagsBuild, endTag, retval) end -- if - inv.config.table.buildExecuted = true + inv.config.table.isBuildExecuted = true inv.state = invStateIdle -- The call to refresh is a little unusual in that we pass the build endTag to the refresh @@ -16608,17 +16623,18 @@ function dbot.storage.init.atActive() -- Create directories for our state if they do not yet exist assert(os.execute("if not exist \"" .. pluginStatePath .. "\" mkdir " .. pluginStatePath .. " > nul"), - "dbot.backup.init.atActive: Failed to create plugin state directory \"" .. pluginStatePath .. "\"") + "dbot.storage.init.atActive: Failed to create plugin state directory \"" .. pluginStatePath .. "\"") local baseDir = dbot.backup.getBaseDir() - dbot.debug("dbot.backup.init.atActive: baseDir=\"" .. baseDir .. "\"") + dbot.debug("dbot.storage.init.atActive: baseDir=\"" .. baseDir .. "\"") assert(os.execute("if not exist \"" .. baseDir .. "\" mkdir " .. baseDir .. " > nul"), - "dbot.backup.init.atActive: Failed to create character-specific state directory \"" .. baseDir .. "\"") + "dbot.storage.init.atActive: Failed to create character-specific state directory \"" .. + baseDir .. "\"") local currentDir = dbot.backup.getCurrentDir() - dbot.debug("dbot.backup.init.atActive: currentDir=\"" .. currentDir .. "\"") + dbot.debug("dbot.storage.init.atActive: currentDir=\"" .. currentDir .. "\"") assert(os.execute("if not exist \"" .. currentDir .. "\" mkdir " .. currentDir .. " > nul"), - "dbot.backup.init.atActive: Failed to create current state directory \"" .. currentDir .. "\"") + "dbot.storage.init.atActive: Failed to create current state directory \"" .. currentDir .. "\"") return DRL_RET_SUCCESS @@ -16889,6 +16905,11 @@ function dbot.backup.current() return DRL_RET_UNINITIALIZED end -- if + if (not inv.config.table.isBackupEnabled) then + dbot.note("Backups are disabled") + return DRL_RET_SUCCESS + end -- if + if dbot.gmcp.isInCombat() then dbot.info("Skipping automatic backup: You are in combat! We'll try again later.") return DRL_RET_IN_COMBAT