# HG changeset patch # User Kim Alvefur # Date 1614254368 -3600 # Node ID 747e8245f18095ddfd31f1fb06098509aaf2531e # Parent a3be7b3cf1e1aa98138957b4cb0c936de8c49ace mod_http_errors: Add some silly variations for the '/' page > "You can do anything in XMPP!" > as a reminiscence of zombo.com -- jonas’ > A study in simplicity. Prosody tagline diff -r a3be7b3cf1e1 -r 747e8245f180 plugins/mod_http_errors.lua --- a/plugins/mod_http_errors.lua Wed Feb 24 16:35:56 2021 +0100 +++ b/plugins/mod_http_errors.lua Thu Feb 25 12:59:28 2021 +0100 @@ -15,6 +15,15 @@ "Where did you put it?", "It's behind you.", "Keep looking." }; [500] = { "% Check your error log for more info."; "Gremlins.", "It broke.", "Don't look at me." }; + ["/"] = { + "A study in simplicity."; + "Better catch it!"; + "Don't just stand there, go after it!"; + "Well, say something, before it runs too far!"; + "Welcome to the world of XMPP!"; + "You can do anything in XMPP!"; -- "The only limit is XML."; + "You can do anything with Prosody!"; -- the only limit is memory? + }; }; local messages = setmetatable(module:get_option("http_errors_messages", {}), { __index = default_messages }); @@ -78,9 +87,10 @@ local request, response = event.request, event.response; if request and response and request.path == "/" and response.status_code == 404 then response.headers.content_type = "text/html; charset=utf-8"; + local message = messages["/"]; return render(html, { title = "Prosody is running!"; - message = "Welcome to the XMPP world!"; + message = message[math.random(#message)]; }); end end, 1);