summaryrefslogtreecommitdiff
path: root/pos.lua
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2013-11-14 19:15:26 -0500
committerShadowNinja <shadowninja@minetest.net>2013-11-14 19:15:26 -0500
commit790ed15594444b4185d9e0da04e0d90c95df2b84 (patch)
treeb8573ec50414963fcd257972ab13f4f3e9b21113 /pos.lua
parentdb664d68f89ccb0208e77491aaec5109574bcc05 (diff)
Chat command regex tweaks
Diffstat (limited to 'pos.lua')
-rw-r--r--pos.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/pos.lua b/pos.lua
index 915fdb8..9bf5205 100644
--- a/pos.lua
+++ b/pos.lua
@@ -44,7 +44,7 @@ minetest.register_chatcommand("area_pos1", {
func = function(name, param)
local pos = nil
local found, _, x, y, z = param:find(
- "^(-?%d+)[%s%,]+(-?%d+)[%s%,]+(-?%d+)$")
+ "^(-?%d+)[, ](-?%d+)[, ](-?%d+)$")
if found then
pos = {x=tonumber(x), y=tonumber(y), z=tonumber(z)}
elseif param == "" then
@@ -77,7 +77,7 @@ minetest.register_chatcommand("area_pos2", {
func = function(name, param)
local pos = nil
local found, _, x, y, z = param:find(
- "^(-?%d+)[%s%,]+(-?%d+)[%s%,]+(-?%d+)$")
+ "^(-?%d+)[, ](-?%d+)[, ](-?%d+)$")
if found then
pos = {x=tonumber(x), y=tonumber(y), z=tonumber(z)}
elseif param == "" then