Quantcast

Fixed derp with Variable/Function naming overlap

jinivus [07-02-16 - 14:52]
Fixed derp with Variable/Function naming overlap
Filename
AutoGratzer.toc
Autogratzer.lua
diff --git a/AutoGratzer.toc b/AutoGratzer.toc
index f537c40..645b94b 100644
--- a/AutoGratzer.toc
+++ b/AutoGratzer.toc
@@ -2,8 +2,8 @@
 ## Interface: 60200
 ## Notes: Autograts to relevant chat on achievement
 ## Title: Autogratzer
-## Version: 2.0.0
+## Version: 2.0.1
 ## DefaultState: Enabled
-## SavedVariablesPerCharacter: AG_GratsMessage,AG_GratsTimeMin,AG_GratsTimeMax,AG_GratsTimeWait,AG_GuildJoinMessageToggle,AG_Guild,AG_Say,AG_Party,AG_Delay,Ag_GuildDisabledOverride,AG_GroupingTime,AG_GuildWelcome,AG_GuildWelcomeMessage
+## SavedVariablesPerCharacter: AG_GratsMessage,AG_GratsTimeMin,AG_GratsTimeMax,AG_GratsTimeWait,AG_GuildJoinMessageToggle,AG_Guild,AG_Say,AG_Party,AG_Delay,Ag_GuildDisabledOverride,AG_GroupingTime,AG_GuildJoinMessageToggle,AG_GuildWelcomeMessage
 Autogratzer.lua
 Autogratzer.xml
diff --git a/Autogratzer.lua b/Autogratzer.lua
index 24bae8f..b36dfd2 100644
--- a/Autogratzer.lua
+++ b/Autogratzer.lua
@@ -35,9 +35,6 @@
 	if(AG_GuildDisabledOverride == nil)then
 		AG_GuildDisabledOverride = false;
 	end
-	if(AG_GuildWelcome == nil)then
-		AG_GuildWelcome = false;
-	end
 	if(AG_GuildWelcomeMessage == nil)then
 		AG_GuildWelcomeMessage = "Welcome :D";
 	end
@@ -89,7 +86,7 @@ function AG_SetupOptionsUI()
 	AutoGratzer.ui.guildWelcomeCheckButton:SetPoint("TOPLEFT",20,-100)
 	AutoGratzer.ui.guildWelcomeCheckButton.text:SetText("New Guild Member Welcoming")
 	AutoGratzer.ui.guildWelcomeCheckButton:SetScript("OnShow", function(self,event,arg1)
-		self:SetChecked(AG_GuildWelcome);
+		self:SetChecked(AG_GuildJoinMessageToggle);
 	end)
 	AutoGratzer.ui.guildWelcomeCheckButton:SetScript("OnClick", function(self,event,arg1)
 		AG_ToggleGuildWelcome();
@@ -235,14 +232,14 @@ function AG_ToggleParty()
 end

 function AG_ToggleGuildWelcome()
-	if(AG_GuildWelcome) then
-		AG_GuildWelcome = false;
+	if(AG_GuildJoinMessageToggle) then
+		AG_GuildJoinMessageToggle = false;
 		AG_Print("New guild member welcoming now off");
 	else
-		AG_GuildWelcome = true;
+		AG_GuildJoinMessageToggle = true;
 		AG_Print("New guild member welcoming now on");
 	end;
-	AutoGratzer.ui.guildWelcomeCheckButton:SetChecked(AG_GuildWelcome);
+	AutoGratzer.ui.guildWelcomeCheckButton:SetChecked(AG_GuildJoinMessageToggle);
 end

 function AG_SetDelay(delay)