Fix a bug with item link parser (items with comma in the name)

This commit is contained in:
Road-block
2017-08-11 04:30:27 +03:00
parent 6b10d1130e
commit 86b2daa5eb
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -781,7 +781,7 @@ function sepgp:captureLootCall(text, sender)
if not (IsRaidLeader() or self:lootMaster()) then return end
if not sender == playerName then return end
if not (string.find(text, "|Hitem:", 1, true)) then return end
local linkstriptext, count = string.gsub(text,"|c%x+|H[eimt:%d]+|h%[[%w%s'%-]+%]|h|r"," ; ")
local linkstriptext, count = string.gsub(text,"|c%x+|H[eimt:%d]+|h%[[%w%s',%-]+%]|h|r"," ; ")
if count > 1 then return end
local lowtext = string.lower(linkstriptext)
local whisperkw_found, mskw_found, oskw_found, link_found
@@ -799,7 +799,7 @@ function sepgp:captureLootCall(text, sender)
if (oskw_found) then break end
end
if (whisperkw_found) or (mskw_found) or (oskw_found) then
_,_,itemLink = string.find(text,"(|c%x+|H[eimt:%d]+|h%[[%w%s'%-]+%]|h|r)")
_,_,itemLink = string.find(text,"(|c%x+|H[eimt:%d]+|h%[[%w%s',%-]+%]|h|r)")
if (itemLink) and (itemLink ~= "") then
link_found, _, itemColor, itemString, itemName = string.find(itemLink, "^(|c%x+)|H(.+)|h(%[.+%])")
end
+1 -1
View File
@@ -3,7 +3,7 @@
## Notes: Effort Points/Gear Points Loot System
## Author: Roadblock
## X-Credits: shooty for original version
## Version: 2.21
## Version: 2.22
## OptionalDeps: Ace2
## SavedVariables: sepgp_saychannel,sepgp_groupbyclass,sepgp_raidonly,sepgp_decay,sepgp_reservechannel,sepgp_main,sepgp_progress,sepgp_discount
## SavedVariablesPerCharacter: sepgp_log