# HG changeset patch # User Kim Alvefur # Date 1430832671 -7200 # Node ID 27aa58ed3e2eaa2f22796056517140b78d283362 # Parent efc1d674eac07b8f3ede2a5eb0dfad440ceb88aa mod_block_registrations: string.find is faster than string.match when only needing a boolean answer diff -r efc1d674eac0 -r 27aa58ed3e2e mod_block_registrations/mod_block_registrations.lua --- a/mod_block_registrations/mod_block_registrations.lua Tue May 05 14:21:13 2015 +0100 +++ b/mod_block_registrations/mod_block_registrations.lua Tue May 05 15:31:11 2015 +0200 @@ -10,7 +10,7 @@ if block_users:contains(username) then return true; end for pattern in block_patterns do - if username:match(pattern) then + if username:find(pattern) then return true; end end