Skip to content

Commit

Permalink
add key_prefix.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
suxb201 committed Sep 22, 2022
1 parent 8a444ac commit d615670
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions filters/key_prefix.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- skip keys prefixed with ABC
function filter(id, is_base, group, cmd_name, keys, slots, db_id, timestamp_ms)
if #keys ~= 1 then
return 0, db_id -- allow
end

if string.sub(keys[1], 0, 3) == "ABC" then
return 1, db_id -- disallow
end

return 0, db_id -- allow
end

0 comments on commit d615670

Please sign in to comment.