Skip to content

Commit 2cf2f27

Browse files
committed
ChatMon/Deprecator: Fixed matching issues
1 parent b240d77 commit 2cf2f27

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

addons/chatmon/depercate_plugin.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
if not windower.file_exists(windower.windower_path .. 'plugins\\ChatMon.dll') then
32
return false
43
end
@@ -29,11 +28,10 @@ local text = read_all_lines(file)
2928

3029
if text ~= '' then
3130

32-
text = string.gsub(text, '%<%?xml version%="1%.0" %?%>%s*', '')
33-
text = string.gsub(text, '<ChatMon>', 'return {')
34-
text = string.gsub(text, '(="[^"]+")', '%1,')
31+
text = string.gsub(text, '.*<ChatMon>', 'return {')
32+
text = string.gsub(text, '(=".-")', '%1,')
3533
text = string.gsub(text, '<settings', 'settings = {')
36-
text = string.gsub(text, '<%!%-%-[^\n]+%-%->%s*', '')
34+
text = string.gsub(text, '<%!%-%-.-%-%->%s*', '')
3735
text = string.gsub(text, '<trigger', '{')
3836
text = string.gsub(text, '</ChatMon>', '}')
3937
text = string.gsub(text, '/?>', '},')

0 commit comments

Comments
 (0)