Browse Source

Added "list load", "load merge" and "list clear"

pull/6/head
tbone 6 years ago
parent
commit
1570b1e8af
  1. 23
      itemwatch.lua

23
itemwatch.lua

@ -308,6 +308,29 @@ ashita.register_event('command', function(cmd, ntype)
return true; return true;
end end
------------------------------------------------------------------------------------------------
-- List Related Commands
------------------------------------------------------------------------------------------------
if (#args >= 4 and args[2] == 'list' and args[3] == 'load') then
local index = tonumber(table.concat(args, ' ', 4));
lists.refresh_saved_lists();
lists.load_list(index);
return true;
end
if (#args >= 4 and args[2] == 'list' and args[3] == 'merge') then
local index = tonumber(table.concat(args, ' ', 4));
lists.refresh_saved_lists();
lists.load_list_merged(index);
return true;
end
if (#args >= 3 and args[2] == 'list' and args[3] == 'clear') then
lists.clear_watched_keys();
lists.clear_watched_items();
return true;
end
return true; return true;
end); end);

Loading…
Cancel
Save