diff mod_block_registrations/mod_block_registrations.lua @ 1697:27aa58ed3e2e

mod_block_registrations: string.find is faster than string.match when only needing a boolean answer
author Kim Alvefur <zash@zash.se>
date Tue, 05 May 2015 15:31:11 +0200
parents dbaa67babeb4
children 368bf9b06484
line wrap: on
line diff
--- 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