Readd hostless loot display

In the chance event someone actually managed to store it.
bug/bundler_fix
William Vu 2017-10-02 23:31:44 -05:00
parent 0723477b49
commit 5b9a4d73ee
1 changed files with 20 additions and 0 deletions

View File

@ -1253,6 +1253,26 @@ class Db
end
end
# Handle hostless loot
if host_ranges.compact.empty? # Wasn't a host search
hostless_loot = framework.db.loots.where(host_id: nil)
hostless_loot.each do |loot|
row = []
row.push("")
row.push("")
row.push(loot.ltype)
row.push(loot.name || "")
row.push(loot.content_type)
row.push(loot.info || "")
row.push(loot.path)
tbl << row
if (mode == :delete)
loot.destroy
delete_count += 1
end
end
end
print_line
print_line(tbl.to_s)
print_status("Deleted #{delete_count} loots") if delete_count > 0