TekNoLogic / StealYourCarbon

WoW Addon - Automatically restock items from vendors and your bank
http://www.tekkub.net
12 stars 9 forks source link

slash commands broken with AddonLoader #7

Closed oscarucb closed 13 years ago

oscarucb commented 13 years ago

If the current alpha is loaded with AddonLoader the slash commands are totally non-functional, because they are registered incorrectly.

Here is the fix:

*** orig/StealYourCarbon.lua    Sat Aug 14 12:28:26 2010
--- StealYourCarbon.lua Thu Sep  2 15:41:55 2010
***************
*** 55,63 ****
  --      Slash Command      --
  -----------------------------

! SLASH_CARBON1 = "/carbon"
! SLASH_CARBON2 = "/syc"
! SlashCmdList.CARBON = function(input)
        if input == "" then
                InterfaceOptionsFrame_OpenToCategory(StealYourCarbon.configframe)
        else
--- 55,61 ----
  --      Slash Command      --
  -----------------------------

! function SYC_Command(input)
        if input == "" then
                InterfaceOptionsFrame_OpenToCategory(StealYourCarbon.configframe)
        else
***************
*** 74,80 ****
                end
        end
  end
!

  ----------------------------------------
  --      Quicklaunch registration      --
--- 72,81 ----
                end
        end
  end
! SLASH_CARBON1 = "/carbon"
! SlashCmdList["CARBON"]= SYC_Command
! SLASH_SYC1 = "/syc"
! SlashCmdList["SYC"]= SYC_Command

  ----------------------------------------
  --      Quicklaunch registration      --
tekkub commented 13 years ago

Please fork and submit a pull request, patch files blow.

oscarucb commented 13 years ago

patched version is here: http://github.com/oscarucb/stealyourcarbon/blob/master/StealYourCarbon.lua