changeset 6321:2f01497b04c9

mod_block_registrations: Fix indentation
author Kim Alvefur <zash@zash.se>
date Sat, 06 Sep 2025 19:25:15 +0200
parents 57cf3fc844f6
children f110bce35630
files mod_block_registrations/mod_block_registrations.lua
diffstat 1 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/mod_block_registrations/mod_block_registrations.lua	Sat Sep 06 20:38:46 2025 +0200
+++ b/mod_block_registrations/mod_block_registrations.lua	Sat Sep 06 19:25:15 2025 +0200
@@ -11,24 +11,24 @@
 local require_pattern = module:get_option_string("block_registrations_require");
 
 function is_blocked(username)
-        -- Check if the username is simply blocked
-        if block_users:contains(username) then return true; end
+	-- Check if the username is simply blocked
+	if block_users:contains(username) then return true; end
 
-        for pattern in block_patterns do
-                if username:find(pattern) then
-                        return true;
-                end
-        end
-        -- Not blocked, but check that username matches allowed pattern
-        if require_pattern and not username:match(require_pattern) then
-                return true;
-        end
+	for pattern in block_patterns do
+		if username:find(pattern) then
+			return true;
+		end
+	end
+	-- Not blocked, but check that username matches allowed pattern
+	if require_pattern and not username:match(require_pattern) then
+		return true;
+	end
 end
 
 module:hook("user-registering", function(event)
-        local username = event.username;
-        if is_blocked(username) then
-                event.allowed = false;
-                return true;
-        end
+	local username = event.username;
+	if is_blocked(username) then
+		event.allowed = false;
+		return true;
+	end
 end, 10);