xeps: Update URLs (but still doesn't work)

Thu, 11 Jun 2020 15:28:18 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 11 Jun 2020 15:28:18 +0100
changeset 153
23b0ddf14e12
parent 152
902544037000
child 154
30a0af8f9999

xeps: Update URLs (but still doesn't work)

plugins/xeps.lua file | annotate | diff | comparison | revisions
--- 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)

mercurial