plugins/xeps.lua

changeset 85
7ec6df0e0ed0
parent 84
ce687757ce3d
child 115
6498ca5ed831
equal deleted inserted replaced
84:ce687757ce3d 85:7ec6df0e0ed0
77 local currxep = {}; 77 local currxep = {};
78 for b in string.gmatch(t,"<xep>(.-)</xep>") do 78 for b in string.gmatch(t,"<xep>(.-)</xep>") do
79 for k,v in string.gmatch(b,"<(%w+)>(.-)</%1>") do 79 for k,v in string.gmatch(b,"<(%w+)>(.-)</%1>") do
80 currxep[k] = v; 80 currxep[k] = v;
81 end 81 end
82 if xeps_short[currxep.shortname] == nil then
83 xeps_short[currxep.shortname] = currxep.number;
84 elseif xeps_short[currxep.shortname] then
85 xeps_short[currxep.shortname] = false; -- kill dupes
86 end
82 xeps[currxep.number] = { }; 87 xeps[currxep.number] = { };
83 for k, v in pairs(currxep) do 88 for k, v in pairs(currxep) do
84 xeps[currxep.number][k] = v; 89 xeps[currxep.number][k] = v;
85 if xeps_short[currxep.shortname] == nil then
86 xeps_short[currxep.shortname] = currxep.number;
87 elseif xeps_short[currxep.shortname] then
88 xeps_short[currxep.shortname] = false; -- kill dupes
89 end
90 end 90 end
91 end 91 end
92 xeps["0028"] = { number = "0028", name = "XSF Plans for World Domination", type="Top Secret", status = "Hidden", updated = "Work ongoing" }; 92 xeps["0028"] = { number = "0028", name = "XSF Plans for World Domination", type="Top Secret", status = "Hidden", updated = "Work ongoing" };
93 return true; 93 return true;
94 end 94 end

mercurial