merge upstream

LoWeR cAsE
Show red error if loading plugin fails
This commit is contained in:
2015-05-14 21:37:51 +02:00
parent 38268496e0
commit 281d01859b
2 changed files with 21 additions and 8 deletions

View File

@ -430,12 +430,17 @@ function send_large_msg_callback(cb_extra, success, result)
end
-- Returns a table with matches or nil
function match_pattern(pattern, text)
function match_pattern(pattern, text, lower_case)
if text then
local matches = { string.match(text, pattern) }
if next(matches) then
return matches
end
local matches = {}
if lower_case then
matches = { string.match(text:lower(), pattern) }
else
matches = { string.match(text, pattern) }
end
if next(matches) then
return matches
end
end
-- nil
end