1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-22 15:48:48 -05:00

Fix executing register_chatcommand-defined commands even in the middle of a chat line

This commit is contained in:
Perttu Ahola 2012-04-13 17:20:43 +03:00
parent 1eac6ff8ff
commit 24603d7ad3

View File

@ -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