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 Sep 29, 2016
1 parent a87a969 commit a05fe92
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
14 changes: 9 additions & 5 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,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.0
## 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
1 change: 0 additions & 1 deletion GreenWall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
</OnValueChanged>
</Scripts>
</Slider>

<CheckButton name="$parentOptionOfficerChat" inherits="InterfaceOptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentOptionJoinDelay"
Expand Down

0 comments on commit a05fe92

Please sign in to comment.