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 committed by Nils Dagsson Moskopp
parent e7654568ed
commit e50d7926d6
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 1 additions and 1 deletions

View File

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