Mercurial > wow > breuesk
comparison Core.lua @ 74:15844864a5f7
Admin mode
| author | John@Doomsday |
|---|---|
| date | Mon, 09 Apr 2012 09:40:14 -0400 |
| parents | 7eb2963eea7d |
| children | 0a3f590f69e6 |
comparison
equal
deleted
inserted
replaced
| 73:7eb2963eea7d | 74:15844864a5f7 |
|---|---|
| 27 _G.bsk=bsk | 27 _G.bsk=bsk |
| 28 local L = LibStub("AceLocale-3.0"):GetLocale("bsk", false) | 28 local L = LibStub("AceLocale-3.0"):GetLocale("bsk", false) |
| 29 setfenv(1,bsk) | 29 setfenv(1,bsk) |
| 30 | 30 |
| 31 local pkgrev = " @project-revision@ " | 31 local pkgrev = " @project-revision@ " |
| 32 admin = admin or true | |
| 33 | 32 |
| 34 -- important things to remember: | 33 -- important things to remember: |
| 35 -- 1) ipairs iterates from 1 until the first missing int index -> no gaps if int | 34 -- 1) ipairs iterates from 1 until the first missing int index -> no gaps if int |
| 36 -- indexing | 35 -- indexing |
| 37 -- 2) a.x === a["x"] | 36 -- 2) a.x === a["x"] |
| 46 db = _G.LibStub("AceDB-3.0"):New("BskDB", defaults, "Default") | 45 db = _G.LibStub("AceDB-3.0"):New("BskDB", defaults, "Default") |
| 47 | 46 |
| 48 options.args.profile = _G.LibStub("AceDBOptions-3.0"):GetOptionsTable(db) | 47 options.args.profile = _G.LibStub("AceDBOptions-3.0"):GetOptionsTable(db) |
| 49 _G.LibStub("AceConfig-3.0"):RegisterOptionsTable("bsk", options) | 48 _G.LibStub("AceConfig-3.0"):RegisterOptionsTable("bsk", options) |
| 50 --optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("bsk", "bsk") | 49 --optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("bsk", "bsk") |
| 50 | |
| 51 admin = db.profile.admin | |
| 51 | 52 |
| 52 local HandlePassThrough = function(...) HandleCommand(...) end | 53 local HandlePassThrough = function(...) HandleCommand(...) end |
| 53 bsk:RegisterChatCommand("bsk", HandlePassThrough) | 54 bsk:RegisterChatCommand("bsk", HandlePassThrough) |
| 54 bsk:OnInitializeSetStaticData() | 55 bsk:OnInitializeSetStaticData() |
| 55 InitializeComm() | 56 InitializeComm() |
