FIXED: Should now produce error when attempting to convert a LFG party to raid.
F16Gaming [10-23-11 - 04:36]
FIXED: Should now produce error when attempting to convert a LFG party to raid.
diff --git a/CommandManager.lua b/CommandManager.lua
index 99bac47..ec9475a 100644
--- a/CommandManager.lua
+++ b/CommandManager.lua
@@ -217,6 +217,9 @@ CM:Register({"acceptlfg", "accept", "join"}, PM.Access.Groups.User.Level, functi
end)
CM:Register({"convert", "conv"}, PM.Access.Groups.Op.Level, function(args, sender, isChat)
+ if GT:IsLFGGroup() then
+ return false, "LFG groups cannot be converted."
+ end
if not GT:IsGroup() then
return false, "Cannot convert if not in a group."
end
diff --git a/GroupTools.lua b/GroupTools.lua
index a8f8006..bf5e50b 100644
--- a/GroupTools.lua
+++ b/GroupTools.lua
@@ -27,6 +27,9 @@ function GT:IsGroup()
return UnitExists("party1")
end
+function GT:IsLFGGroup()
+ return (select(1, GetLFGMode())) == "lfgparty"
+
function GT:IsRaid()
return UnitInRaid("player")
end