53 for _, x in ipairs(results) do |
53 for _, x in ipairs(results) do |
54 local xepnum = tostring(tonumber(x)); |
54 local xepnum = tostring(tonumber(x)); |
55 xepnum = string.rep("0", 4-x:len())..x; |
55 xepnum = string.rep("0", 4-x:len())..x; |
56 local xep = xeps[tostring(x)]; |
56 local xep = xeps[tostring(x)]; |
57 ret = string.format("%s XEP-%s: %s%s", ret, xep.number, xep.name, ((_ < #results) and ",") or ""); |
57 ret = string.format("%s XEP-%s: %s%s", ret, xep.number, xep.name, ((_ < #results) and ",") or ""); |
|
58 if _ > 5 then ret = ret .. " " .. (#results - 5) .. " more"; break; end |
58 end |
59 end |
59 return ret; |
60 return ret; |
60 end |
61 end |
61 end |
62 end |
62 -- Check that xepnum is a valid number |
63 -- Check that xepnum is a valid number |