From 334b002da3b5340f8f618bc8f4e21d876dad2982 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 21 Sep 2009 14:42:01 +0100 Subject: net.dns: Accidentally committed a hard-coded 4.2.2.1 nameserver --- net/dns.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/net/dns.lua b/net/dns.lua index b5f87ad2..ff07d26e 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -504,7 +504,6 @@ function resolver:setnameserver (address) -- - - - - - - - - - setnameserver function resolver:adddefaultnameservers () -- - - - - adddefaultnameservers - self:addnameserver("4.2.2.1"); do return; end local resolv_conf = io.open("/etc/resolv.conf"); if resolv_conf then for line in resolv_conf:lines() do -- cgit v1.2.3 From a4e1ea92f6aaea0f107f124a4bafc9676189da59 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 21 Sep 2009 15:09:22 +0100 Subject: prosody.cfg.lua.dist: Add example of declaring admins for a server --- prosody.cfg.lua.dist | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/prosody.cfg.lua.dist b/prosody.cfg.lua.dist index 38618131..de460956 100644 --- a/prosody.cfg.lua.dist +++ b/prosody.cfg.lua.dist @@ -32,6 +32,12 @@ -- Server-wide settings go in this section Host "*" + -- This is a (by default, empty) list of accounts that are admins + -- for the server. Note that you must create the accounts separately + -- (see http://prosody.im/doc/creating_accounts for info) + -- Example: admins = { "user1@example.com", "user2@example.net" } + admins = { } + -- This is the list of modules Prosody will load on startup. -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too. modules_enabled = { -- cgit v1.2.3 -- cgit v1.2.3 From 3c22160354ee11ce92c0e337b6c753426b9cebdb Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 21 Sep 2009 17:57:28 +0100 Subject: mod_httpserver: Configurable filesystem path to serve from --- plugins/mod_httpserver.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_httpserver.lua b/plugins/mod_httpserver.lua index 55ac3c7a..73357f1b 100644 --- a/plugins/mod_httpserver.lua +++ b/plugins/mod_httpserver.lua @@ -13,7 +13,7 @@ local open = io.open; local t_concat = table.concat; local check_http_path; -local http_base = "www_files"; +local http_base = config.get("*", "core", "http_path") or "www_files"; local response_403 = { status = "403 Forbidden", body = "

Invalid URL

Sorry, we couldn't find what you were looking for :(" }; local response_404 = { status = "404 Not Found", body = "

Page Not Found

Sorry, we couldn't find what you were looking for :(" }; -- cgit v1.2.3 -- cgit v1.2.3 From 5d726e1c28b1c004632fabeb49d1ad3a0741605e Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 23 Sep 2009 13:17:13 +0100 Subject: mod_welcome: Change $user to $username in default welcome message (thanks to neustradamus for spotting) --- plugins/mod_welcome.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_welcome.lua b/plugins/mod_welcome.lua index 5c0da8b8..e9444363 100644 --- a/plugins/mod_welcome.lua +++ b/plugins/mod_welcome.lua @@ -9,7 +9,7 @@ local config = require "core.configmanager"; local host = module:get_host(); -local welcome_text = config.get("*", "core", "welcome_message") or "Hello $user, welcome to the $host IM server!"; +local welcome_text = config.get("*", "core", "welcome_message") or "Hello $username, welcome to the $host IM server!"; local st = require "util.stanza"; -- cgit v1.2.3 From e0c4e19bab9f19717c626bba804f2421823d2be7 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 24 Sep 2009 11:14:05 +0100 Subject: net.dns: Respect commented nameserver entries in resolv.conf (thanks Remko) --- net/dns.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/dns.lua b/net/dns.lua index ff07d26e..da06ceaa 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -507,8 +507,8 @@ function resolver:adddefaultnameservers () -- - - - - adddefaultnameservers local resolv_conf = io.open("/etc/resolv.conf"); if resolv_conf then for line in resolv_conf:lines() do - local address = string.match (line, 'nameserver%s+(%d+%.%d+%.%d+%.%d+)') - if address then self:addnameserver (address) end + local address = string.match (line, '^%s*nameserver%s+(%d+%.%d+%.%d+%.%d+)') + if address then self:addnameserver (address) end end elseif os.getenv("WINDIR") then self:addnameserver ("208.67.222.222") -- cgit v1.2.3