From deeb195d6737b680a41f3df211a91f5138590224 Mon Sep 17 00:00:00 2001 From: jp Date: Tue, 8 Dec 2015 17:01:38 +0100 Subject: [PATCH] don't watch yourself --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 6b8760a..9b17970 100644 --- a/init.lua +++ b/init.lua @@ -13,7 +13,7 @@ minetest.register_chatcommand("watch", { local watched_player_name = minetest.get_player_by_name(watched) original_pos[watcher] = watcher:getpos() - if watched and watched_player_name and watcher and + if name ~= watched and watched and watched_player_name and watcher and default.player_attached[name] == false then default.player_attached[name] = true @@ -35,7 +35,7 @@ minetest.register_chatcommand("watch", { return true, "Watching '"..watched.."' at "..minetest.pos_to_string(vector.round(watched_player_name:getpos())).."..." end - return false, "Invalid parameters ('"..param.."'), or player not found, or you're already watching a player." + return false, "Invalid parameters ('"..param.."') or you're already watching a player." end })