From be0be10923489500bb00468e07e198796d38f6b9 Mon Sep 17 00:00:00 2001 From: Thijs Alkemade Date: Thu, 10 Mar 2016 10:13:57 +0100 Subject: util.dependencies: Show the full error when a symbol is not found (i.e., when running Prosody with the wrong version of Lua). --- util/dependencies.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/dependencies.lua b/util/dependencies.lua index 9ab40765..b3f07257 100644 --- a/util/dependencies.lua +++ b/util/dependencies.lua @@ -101,7 +101,7 @@ local function check_dependencies() local encodings, err = softreq "util.encodings" if not encodings then - if err:match("not found") then + if err:match("module '[^']*' not found") then missingdep("util.encodings", { ["Windows"] = "Make sure you have encodings.dll from the Prosody distribution in util/"; ["GNU/Linux"] = "Run './configure' and 'make' in the Prosody source directory to build util/encodings.so"; }); @@ -118,7 +118,7 @@ local function check_dependencies() local hashes, err = softreq "util.hashes" if not hashes then - if err:match("not found") then + if err:match("module '[^']*' not found") then missingdep("util.hashes", { ["Windows"] = "Make sure you have hashes.dll from the Prosody distribution in util/"; ["GNU/Linux"] = "Run './configure' and 'make' in the Prosody source directory to build util/hashes.so"; }); -- cgit v1.2.3 From a574e5c9179d4234234e422d4ee82a67b5266dcc Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 11 Mar 2016 13:13:20 +0100 Subject: mod_presence: Use type-specific config API for boolean 'ignore_presence_priority' option --- plugins/mod_presence.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua index ab57a158..76394baf 100644 --- a/plugins/mod_presence.lua +++ b/plugins/mod_presence.lua @@ -51,7 +51,7 @@ local function recalc_resource_map(user) end end -local ignore_presence_priority = module:get_option("ignore_presence_priority"); +local ignore_presence_priority = module:get_option_boolean("ignore_presence_priority", false); function handle_normal_presence(origin, stanza) if ignore_presence_priority then -- cgit v1.2.3 From 79a36fbfcde1f2fa214551c9e5d879f43a4ef7ca Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 11 Mar 2016 13:34:32 +0100 Subject: MUC: Use type-specific config API for the 'name' option --- plugins/muc/mod_muc.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 69351504..ee90d552 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -13,8 +13,7 @@ if module:get_host_type() ~= "component" then end local muc_host = module:get_host(); -local muc_name = module:get_option("name"); -if type(muc_name) ~= "string" then muc_name = "Prosody Chatrooms"; end +local muc_name = module:get_option_string("name", "Prosody Chatrooms"); local restrict_room_creation = module:get_option("restrict_room_creation"); if restrict_room_creation then if restrict_room_creation == true then -- cgit v1.2.3 From abdd21688701aa4ad6438a388cb84e0cd76dfe44 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 11 Mar 2016 13:36:48 +0100 Subject: prosodyctl check: Add 'vcard_compatibility' to deprecated options --- prosodyctl | 1 + 1 file changed, 1 insertion(+) diff --git a/prosodyctl b/prosodyctl index e902ac58..a7483456 100755 --- a/prosodyctl +++ b/prosodyctl @@ -869,6 +869,7 @@ function commands.check(arg) print("Checking config..."); local deprecated = set.new({ "bosh_ports", "disallow_s2s", "no_daemonize", "anonymous_login", "require_encryption", + "vcard_compatibility", }); local known_global_options = set.new({ "pidfile", "log", "plugin_paths", "prosody_user", "prosody_group", "daemonize", -- cgit v1.2.3 From 3cee8c1473a0938b58ec0ed93c266c33ec26a4a6 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 11 Mar 2016 13:37:18 +0100 Subject: mod_watchregistrations: Use type-specific config API for 'registration_notification' --- plugins/mod_watchregistrations.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_watchregistrations.lua b/plugins/mod_watchregistrations.lua index b7be5daf..1e696f30 100644 --- a/plugins/mod_watchregistrations.lua +++ b/plugins/mod_watchregistrations.lua @@ -11,7 +11,7 @@ local host = module:get_host(); local jid_prep = require "util.jid".prep; local registration_watchers = module:get_option_set("registration_watchers", module:get_option("admins", {})) / jid_prep; -local registration_notification = module:get_option("registration_notification", "User $username just registered on $host from $ip"); +local registration_notification = module:get_option_string("registration_notification", "User $username just registered on $host from $ip"); local st = require "util.stanza"; -- cgit v1.2.3