Fix executing register_chatcommand-defined commands even in the middle of a chat...
authorPerttu Ahola <celeron55@gmail.com>
Fri, 13 Apr 2012 14:20:43 +0000 (17:20 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 13 Apr 2012 14:20:48 +0000 (17:20 +0300)
builtin/chatcommands.lua

index e5d31c6aa0a08dea393612f2d809dadcecb5f19f..7845c7083c283c2928d622ddc6d28c5a676e5118 100644 (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