Don't allow spell changes while in combat from the command line. Should fix exception stacks I see reported from people changing spells while in combat (I assume macros or something are in use)

Mere [08-26-13 - 10:24]
Don't allow spell changes while in combat from the command line.  Should fix exception stacks I see reported from people changing spells while in combat (I assume macros or something are in use)
Filename
CommandLine.lua
diff --git a/CommandLine.lua b/CommandLine.lua
index a4e646e..63b44f8 100644
--- a/CommandLine.lua
+++ b/CommandLine.lua
@@ -160,12 +160,14 @@ function MereHealingFrames.Commands.Spells(params)
         GetOpt.print(SpellOptions)
         return
     end
-
+
+    local inCombat = Inspect.System.Secure()
+
 	if (getOptParams.list) then
 		print("Listing current spell set")
         MereHealingFrames.Spells.printSpellSet(MereHealingFrames.CurrentSpellSet)
 		return
-	elseif (getOptParams.button) then
+	elseif (getOptParams.button and not inCombat) then
 		local spellSetName = getOptParams.name
 		local internalButton = buttonNameToInternalName[getOptParams.button]
 		if not internalButton then
@@ -199,16 +201,18 @@ function MereHealingFrames.Commands.Spells(params)
 		MereHealingFrames.Spells.UpdateCurrentSpells()

 		print("Configured button")
-	elseif (getOptParams.mere) then
+	elseif (getOptParams.mere and not inCombat) then
 		MereHealingFrames.Spells.CreateMagicMere()
 		MereHealingFrames.Spells.UpdateCurrentSpells()
-	elseif (getOptParams.reset) then
+	elseif (getOptParams.reset  and not inCombat) then
 		if not MereHealingFrames.Spells.ResetSpells(getOptParams.name) then
 			print("Failed to reset spell set")
 			return
 		end
 		MereHealingFrames.Spells.UpdateCurrentSpells()
 		print("Spell set reset, and reloaded")
+    elseif (inCombat) then
+        print("Unable to change spell configuration while in combat");
     else
         print("/mhf spell should be followed by the options:")
         GetOpt.print(SpellOptions)