This does not implement *nix Glob Patterns, but rather simply uses Lua patterns. Nobody in their right mind would do rm -rf .* in their terminal - that will not remove all files, but rather only hidden files (files starting with a dot in their name)!
The only function provided is not exactly useful; how often do you need to kick multiple players based on a pattern? I could imagine this being useful only in very rare cases where an attacker is dumb enough to make his names follow a pattern. What makes this even more useless is that the Minetest chat features tab completion for playernames.
What I could see being useful: Actual globs, e.g. for file traversal purposes, but as an API rather than user-facing chatcommands.
That's my mistake in the README - it should be rm -rf *. This is mainly an API, but with some chatcommands built-in, hopefully be useful and/or be an example of using the API.
This does not implement *nix Glob Patterns, but rather simply uses Lua patterns. Nobody in their right mind would do
rm -rf .*
in their terminal - that will not remove all files, but rather only hidden files (files starting with a dot in their name)!The only function provided is not exactly useful; how often do you need to kick multiple players based on a pattern? I could imagine this being useful only in very rare cases where an attacker is dumb enough to make his names follow a pattern. What makes this even more useless is that the Minetest chat features tab completion for playernames.
What I could see being useful: Actual globs, e.g. for file traversal purposes, but as an API rather than user-facing chatcommands.
That's my mistake in the README - it should be
rm -rf *
. This is mainly an API, but with some chatcommands built-in, hopefully be useful and/or be an example of using the API.The actual syntax of glob patterns are documented in (
glob/glob/README.md
)[https://github.com/C-C-Minetest-Server/glob/tree/main/glob], where the following syntaxes are supported:*
: Match any combination (zero or more) of any charactors (.*
)?
: Match exactly one any charactor (.
)[abc]
,[A-Za-z]
: Match one of the charactors listed inside, or in the range specified. ([abc]
)These are the most common glob patterns as said on the Wikipedia article.