mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Fix executing register_chatcommand-defined commands even in the middle of a chat line
This commit is contained in:
parent
1eac6ff8ff
commit
24603d7ad3
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ function minetest.register_chatcommand(cmd, def)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_chat_message(function(name, message)
|
minetest.register_on_chat_message(function(name, message)
|
||||||
local cmd, param = string.match(message, "/([^ ]+) *(.*)")
|
local cmd, param = string.match(message, "^/([^ ]+) *(.*)")
|
||||||
if not param then
|
if not param then
|
||||||
param = ""
|
param = ""
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue