From 24603d7ad3421284246116656abb533098a24631 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 13 Apr 2012 17:20:43 +0300 Subject: [PATCH] Fix executing register_chatcommand-defined commands even in the middle of a chat line --- builtin/chatcommands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/chatcommands.lua b/builtin/chatcommands.lua index e5d31c6a..7845c708 100644 --- a/builtin/chatcommands.lua +++ b/builtin/chatcommands.lua @@ -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