From bf9f9f97a926dd32433e63ba2f308e9a16bc5e23 Mon Sep 17 00:00:00 2001 From: "Y. Wang" Date: Wed, 2 Nov 2022 15:08:21 +0100 Subject: Add helper for "insufficient privileges" messages BREAKING: attrans is now implemented as a table with the __call metamethod instead of as a function --- advtrains/couple.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'advtrains/couple.lua') diff --git a/advtrains/couple.lua b/advtrains/couple.lua index b6a445e..ae36593 100644 --- a/advtrains/couple.lua +++ b/advtrains/couple.lua @@ -184,8 +184,8 @@ end function advtrains.safe_couple_trains(train1, t1_is_front, train2, t2_is_front, pname) if pname and not minetest.check_player_privs(pname, "train_operator") then - minetest.chat_send_player(pname, "Missing train_operator privilege") - return false + minetest.chat_send_player(pname, attrans.nopriv("train_operator", "couple trains")) + return false end local wck_t1, wck_t2 -- cgit v1.2.3