Skip to content

Commit

Permalink
Added cpref switch. (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrogaski committed Jan 13, 2017
1 parent 830ad52 commit d2f1158
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
16 changes: 10 additions & 6 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function GwConfig:load()
end
return estr
end

local function get_gm_officer_note()
if not gw.IsOfficer() then
return
Expand Down Expand Up @@ -198,11 +198,15 @@ function GwConfig:load()
--
-- Check configuration version
--
if strmatch(info, 'GWc=".*"') then
gw.Error('Guild configuration uses a format not supported by this version.')
end
if strmatch(info, 'GW:?c:') then
self.cversion = 1
if self.cpref == 0 then
if strmatch(info, 'GWc=".*"') then
gw.Error('Guild configuration uses a format not supported by this version.')
end
if strmatch(info, 'GW:?c:') then
self.cversion = 1
end
else
self.cversion = cpref
end

if self.cversion == 1 then
Expand Down
5 changes: 4 additions & 1 deletion Globals.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ gw.option = {
redact = { default=true,
desc="obfuscate sensitive data in debug output" },
joindelay = { default=30, min=0, max=120, step=1,
desc="channel join delay" }
desc="channel join delay" },
-- Development switch to force preferred configuration version.
cpref = { default=0, min=0, max=2,
desc="force the configuration version" }
}

gw.usage = [[
Expand Down
2 changes: 1 addition & 1 deletion GreenWall.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: GreenWall
## Notes: Common communication channel as a replacement for guild chat in guild confederations.
## Author: Mark Rogaski <[email protected]>
## Version: 1.8.2
## Version: 2.0.0-dev
## URL: https://github.com/AIE-Guild/GreenWall
## URL: http://wow.curse.com/downloads/wow-addons/details/greenwall.aspx
## DefaultState: enabled
Expand Down

0 comments on commit d2f1158

Please sign in to comment.