summaryrefslogtreecommitdiff
path: root/chatcommands.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 /chatcommands.lua
parentdb664d68f89ccb0208e77491aaec5109574bcc05 (diff)
Chat command regex tweaks
Diffstat (limited to 'chatcommands.lua')
-rw-r--r--chatcommands.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/chatcommands.lua b/chatcommands.lua
index 74c8945..f719838 100644
--- a/chatcommands.lua
+++ b/chatcommands.lua
@@ -44,7 +44,7 @@ minetest.register_chatcommand("set_owner", {
.." area to any existing area",
privs = {areas=true},
func = function(name, param)
- local found, _, ownername, areaname = param:find('^([^%s]+)%s(.+)$')
+ local found, _, ownername, areaname = param:find('^([^ ]+) (.+)$')
if not found then
minetest.chat_send_player(name, "Incorrect usage, see /help set_owner")
@@ -90,7 +90,7 @@ minetest.register_chatcommand("add_owner", {
privs = {},
func = function(name, param)
local found, _, pid, ownername, areaname
- = param:find('^(%d+)%s([^%s]+)%s(.+)$')
+ = param:find('^(%d+) ([^ ]+) (.+)$')
if not found then
minetest.chat_send_player(name, "Incorrect usage, see /help set_owner")
@@ -142,7 +142,7 @@ minetest.register_chatcommand("rename_area", {
description = "Rename a area that you own",
privs = {},
func = function(name, param)
- local found, _, id, newName = param:find("^(%d+)%s(.+)$")
+ local found, _, id, newName = param:find("^(%d+) (.+)$")
if not found then
minetest.chat_send_player(name,
"Invalid usage, see /help rename_area")
@@ -274,8 +274,8 @@ minetest.register_chatcommand("change_owner", {
privs = {},
func = function(name, param)
local found, _, id, new_owner =
- param:find('^(%d+)%s+([^%s]+)$')
-
+ param:find('^(%d+) ([^ ]+)$')
+
if not found then
minetest.chat_send_player(name,
"Invalid usage,"