diff --git a/filters/key_prefix.lua b/filters/key_prefix.lua new file mode 100644 index 00000000..e17d18c2 --- /dev/null +++ b/filters/key_prefix.lua @@ -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 \ No newline at end of file