forked from minetest-mods/warps
Remove odd chars from warp name
This commit is contained in:
parent
aa772124b3
commit
7d36e4b3c0
1
init.lua
1
init.lua
@ -139,6 +139,7 @@ minetest.register_chatcommand("setwarp", {
|
|||||||
description = "Set a warp location to the players location",
|
description = "Set a warp location to the players location",
|
||||||
privs = { warp_admin = true },
|
privs = { warp_admin = true },
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
|
param = param:gsub("%W", "")
|
||||||
local h = "created"
|
local h = "created"
|
||||||
for i = 1,table.getn(warps) do
|
for i = 1,table.getn(warps) do
|
||||||
if warps[i].name == param then
|
if warps[i].name == param then
|
||||||
|
Loading…
Reference in New Issue
Block a user