# HG changeset patch # User Matthew Wild # Date 1591885698 -3600 # Node ID 23b0ddf14e12ae6af95286e0ebb5198d085163ed # Parent 902544037000d47eb3d10bafd4f9f6cd5ede7a83 xeps: Update URLs (but still doesn't work) diff -r 902544037000 -r 23b0ddf14e12 plugins/xeps.lua --- a/plugins/xeps.lua Thu Jun 11 15:27:55 2020 +0100 +++ b/plugins/xeps.lua Thu Jun 11 15:28:18 2020 +0100 @@ -6,7 +6,7 @@ bot:hook("commands/xep", function(command) -- Cache XEP list for an hour if os.difftime(os.time(), xeps_updated_at) > (60 * 60) then -- Not refreshed within 1 hour - http.request('http://xmpp.org/extensions/xeps.xml', nil, function (data, code) + http.request('https://xmpp.org/extensions/xeplist.xml', nil, function (data, code) if code ~= 200 then if code > 0 then command:reply("Received HTTP "..code.." error trying to fetch the XEP list"); @@ -33,7 +33,7 @@ elseif not tonumber(xepnum) then -- Search for an XEP if xepnum:match("^(%d+) ex%S* (%d+)$") then local num, example = xepnum:match("^(%d+) ex%S* (%d+)$"); - return "http://xmpp.org/extensions/xep-"..string.rep("0", 4-num:len())..num..".html#example-"..tostring(example); + return "https://xmpp.org/extensions/xep-"..string.rep("0", 4-num:len())..num..".html#example-"..tostring(example); end local results = {}; for x, xep in pairs(xeps) do @@ -68,7 +68,7 @@ xepnum = string.rep("0", 4-xepnum:len())..xepnum; xep = xeps[tostring(xepnum)]; if not xep then return "Sorry, I don't think there is a XEP-"..xepnum; end - return "XEP-"..xep.number..": "..xep.name.." is "..xep.type.." ("..xep.status..", "..xep.updated..") See: http://xmpp.org/extensions/xep-"..xep.number..".html"; + return "XEP-"..xep.number..": "..xep.name.." is "..xep.type.." ("..xep.status..", "..xep.updated..") See: https://xmpp.org/extensions/xep-"..xep.number..".html"; end function parse_xeps(t)