Fix executing register_chatcommand-defined commands even in the middle of a chat line
This commit is contained in:
parent
e7654568ed
commit
e50d7926d6
|
@ -14,7 +14,7 @@ function minetest.register_chatcommand(cmd, def)
|
|||
end
|
||||
|
||||
minetest.register_on_chat_message(function(name, message)
|
||||
local cmd, param = string.match(message, "/([^ ]+) *(.*)")
|
||||
local cmd, param = string.match(message, "^/([^ ]+) *(.*)")
|
||||
if not param then
|
||||
param = ""
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue