aboutsummaryrefslogtreecommitdiffstats
path: root/tools/dnsregistry.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dnsregistry.lua')
-rw-r--r--tools/dnsregistry.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/dnsregistry.lua b/tools/dnsregistry.lua
index 3fd26628..5a258c1a 100644
--- a/tools/dnsregistry.lua
+++ b/tools/dnsregistry.lua
@@ -1,5 +1,8 @@
-- Generate util/dnsregistry.lua from IANA HTTP status code registry
-local xml = require "util.xml";
+if not pcall(require, "prosody.loader") then
+ pcall(require, "loader");
+end
+local xml = require "prosody.util.xml";
local registries = xml.parse(io.read("*a"), { allow_processing_instructions = true });
print("-- Source: https://www.iana.org/assignments/dns-parameters/dns-parameters.xml");
@@ -22,7 +25,7 @@ for registry in registries:childtags("registry") do
local record_desc = record:get_child_text("description");
local record_code = tonumber(record:get_child_text("value"));
- if tostring(record):lower():match("reserved") or tostring(record):lower():match("reserved") then
+ if tostring(record):lower():match("reserved") or tostring(record):lower():match("unassigned") then
record_code = nil;
end