Diff

mod_mam/mod_mam.lua @ 1788:d2b82b90c413

mod_mam: Unindent 'else' block
author Kim Alvefur <zash@zash.se>
date Wed, 26 Aug 2015 17:22:14 +0200
parent 1773:fb2b9a2e2316
child 1790:4c2146f5bf39
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua	Tue Aug 25 16:58:39 2015 +0200
+++ b/mod_mam/mod_mam.lua	Wed Aug 26 17:22:14 2015 +0200
@@ -201,18 +201,18 @@
 	module:log("debug", "%s's rule for %s is %s", user, who, tostring(rule));
 	if rule ~= nil then
 		return rule;
-	else -- Below could be done by a metatable
-		local default = prefs[false];
-		module:log("debug", "%s's default rule is %s", user, tostring(default));
-		if default == nil then
-			default = global_default_policy;
-			module:log("debug", "Using global default rule, %s", tostring(default));
-		end
-		if default == "roster" then
-			return has_in_roster(user, who);
-		end
-		return default;
 	end
+	-- Below could be done by a metatable
+	local default = prefs[false];
+	module:log("debug", "%s's default rule is %s", user, tostring(default));
+	if default == nil then
+		default = global_default_policy;
+		module:log("debug", "Using global default rule, %s", tostring(default));
+	end
+	if default == "roster" then
+		return has_in_roster(user, who);
+	end
+	return default;
 end
 
 -- Handle messages