Chatplus: fix name pattern matching

This commit is contained in:
rubenwardy 2015-12-07 23:31:55 +00:00
parent c1bafebbdd
commit 3ec682c773

View file

@ -325,7 +325,7 @@ minetest.register_chatcommand("mail", {
description = "mail: add a message to a player's inbox",
func = function(name, param)
chatplus.poke(name)
local to, msg = string.match(param, "([%a%d_]+) (.+)")
local to, msg = string.match(param, "^([%a%d_-]+) (.+)")
if not to or not msg then
minetest.chat_send_player(name,"mail: <playername> <msg>",false)