Added more functions to slash command
p3lim-52096 [11-23-08 - 18:32]
Added more functions to slash command
Fixed multiple loads
git-svn-id: svn://svn.wowinterface.com/pMinimap-54/trunk@65 ae24c21f-2f0c-4c94-9256-0092abe71e0d
diff --git a/pMinimap/pMinimap.lua b/pMinimap/pMinimap.lua
index 3c66dc3..fcd28f0 100644
--- a/pMinimap/pMinimap.lua
+++ b/pMinimap/pMinimap.lua
@@ -31,7 +31,9 @@ for _, check in pairs{InterfaceOptionsDisplayPanelShowClock} do
check.Enable = function() end
end
-function pMinimap:ADDON_LOADED(event)
+function pMinimap:ADDON_LOADED(event, addon)
+ if(addon ~= 'pMinimap') then return end
+
pMinimapDB = pMinimapDB or {}
for k,v in pairs(defaults) do
if(type(pMinimapDB[k]) == 'nil') then
@@ -122,7 +124,11 @@ end
SlashCmdList['PMMC'] = function(str)
if(str:find('reset')) then
+ pMinimapDB = {}
+ print('|cffff6000p|rMinimap: |cff0090ffSavedvariables is now reset.|r')
+ elseif(str:find('refresh')) then
Minimap:SetMaskTexture([=[Interface\ChatFrame\ChatFrameBackground]=])
+ print('|cffff6000p|rMinimap: |cff0090ffMinimap mask is now refreshed.|r')
else
if(not IsAddOnLoaded('pMinimap_Config')) then
LoadAddOn('pMinimap_Config')