module refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-10-14 02:31:45 +02:00
parent fcdbe9cb2c
commit 314e66812b
3 changed files with 15 additions and 15 deletions
+8 -8
View File
@@ -8,30 +8,30 @@ local cache = require 'aux.core.cache'
_G.aux_ignore_owner = true
SLASH_AUX1 = '/aux'
function SlashCmdList.AUX(command)
_G.SLASH_AUX1 = '/aux'
function _G.SlashCmdList.AUX(command)
if not command then return end
local arguments = tokenize(command)
if arguments[1] == 'clear' and arguments[2] == 'history' then
persistence.dataset = nil
print 'History cleared.'
print'History cleared.'
elseif arguments[1] == 'clear' and arguments[2] == 'post' then
persistence.dataset.post = nil
print 'Post settings cleared.'
print'Post settings cleared.'
elseif arguments[1] == 'clear' and arguments[2] == 'datasets' then
_G.aux_datasets = t
print 'Datasets cleared.'
print'Datasets cleared.'
elseif arguments[1] == 'clear' and arguments[2] == 'merchant' and arguments[3] == 'buy' then
_G.aux_merchant_buy = t
print 'Merchant buy prices cleared.'
print'Merchant buy prices cleared.'
elseif arguments[1] == 'clear' and arguments[2] == 'merchant' and arguments[3] == 'sell' then
_G.aux_merchant_sell = t
print 'Merchant sell prices cleared.'
print'Merchant sell prices cleared.'
elseif arguments[1] == 'clear' and arguments[2] == 'item' and arguments[3] == 'cache' then
_G.aux_items = t
_G.aux_item_ids = t
_G.aux_auctionable_items = t
print 'Item cache cleared.'
print'Item cache cleared.'
elseif arguments[1] == 'populate' and arguments[2] == 'wdb' then
cache.populate_wdb()
elseif arguments[1] == 'tooltip' and arguments[2] == 'value' then