From: Perttu Ahola Date: Fri, 13 Apr 2012 14:20:43 +0000 (+0300) Subject: Fix executing register_chatcommand-defined commands even in the middle of a chat... X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=24603d7ad3421284246116656abb533098a24631;p=zefram%2Fminetest%2Fminetest_engine.git Fix executing register_chatcommand-defined commands even in the middle of a chat line --- 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