|
|
@ -1667,24 +1667,31 @@ function inv.cli.refresh.fn(name, line, wildcards)
|
|
|
|
|
|
|
|
|
|
|
|
if (command == "off") then
|
|
|
|
if (command == "off") then
|
|
|
|
retval = inv.items.refreshOff()
|
|
|
|
retval = inv.items.refreshOff()
|
|
|
|
dbot.note("Automatic inventory refresh is disabled: run \"@G" .. pluginNameCmd ..
|
|
|
|
dbot.info("Automatic inventory refresh is disabled: run \"@G" .. pluginNameCmd ..
|
|
|
|
" refresh on@W\" to re-enable it")
|
|
|
|
" refresh on@W\" to re-enable it")
|
|
|
|
inv.tags.stop(invTagsRefresh, line, retval)
|
|
|
|
inv.tags.stop(invTagsRefresh, line, retval)
|
|
|
|
|
|
|
|
|
|
|
|
elseif (command == "on") then
|
|
|
|
elseif (command == "on") then
|
|
|
|
retval = inv.items.refreshOn(refreshPeriod, 0)
|
|
|
|
retval = inv.items.refreshOn(refreshPeriod, 0)
|
|
|
|
dbot.note("Inventory refresh is enabled")
|
|
|
|
dbot.info("Inventory refresh is enabled")
|
|
|
|
inv.tags.stop(invTagsRefresh, line, retval)
|
|
|
|
inv.tags.stop(invTagsRefresh, line, retval)
|
|
|
|
|
|
|
|
|
|
|
|
elseif (command == "eager") then
|
|
|
|
elseif (command == "eager") then
|
|
|
|
retval = inv.items.refreshOn(refreshPeriod, inv.items.timer.refreshEagerSec or 0)
|
|
|
|
retval = inv.items.refreshOn(refreshPeriod, inv.items.timer.refreshEagerSec or 0)
|
|
|
|
dbot.note("Inventory refresh is enabled and uses eager refreshes after acquiring items")
|
|
|
|
dbot.info("Inventory refresh is enabled and uses eager refreshes after acquiring items")
|
|
|
|
inv.tags.stop(invTagsRefresh, line, retval)
|
|
|
|
inv.tags.stop(invTagsRefresh, line, retval)
|
|
|
|
|
|
|
|
|
|
|
|
elseif (command == "") or (command == "all") then
|
|
|
|
elseif (command == "") or (command == "all") then
|
|
|
|
if (inv.state == invStatePaused) then
|
|
|
|
if (inv.state == invStatePaused) then
|
|
|
|
inv.state = invStateIdle
|
|
|
|
inv.state = invStateIdle
|
|
|
|
end -- if
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (command == "") then
|
|
|
|
|
|
|
|
dbot.info("Inventory refresh started")
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
dbot.info("Inventory refresh full scan started")
|
|
|
|
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
|
|
local retval = inv.items.refresh(0, refreshLoc, line, nil)
|
|
|
|
local retval = inv.items.refresh(0, refreshLoc, line, nil)
|
|
|
|
if (retval == DRL_RET_HALTED) then
|
|
|
|
if (retval == DRL_RET_HALTED) then
|
|
|
|
dbot.note("Run \"" .. pluginNameCmd .. " refresh on\" to re-enable automatic inventory refreshes")
|
|
|
|
dbot.note("Run \"" .. pluginNameCmd .. " refresh on\" to re-enable automatic inventory refreshes")
|
|
|
|