various cleanups
This commit is contained in:
parent
6fff4cb0c4
commit
e99f8e581e
20
announce.lua
20
announce.lua
@ -1,20 +0,0 @@
|
||||
|
||||
|
||||
|
||||
minetest.register_chatcommand("announce_join", {
|
||||
description = "join message",
|
||||
privs = {no_announce=true},
|
||||
func = function(player_name)
|
||||
minetest.chat_send_all("*** " .. player_name .. " joined the game.")
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_chatcommand("announce_leave", {
|
||||
description = "leave message",
|
||||
privs = {no_announce=true},
|
||||
func = function(player_name)
|
||||
minetest.chat_send_all("*** " .. player_name .. " left the game.")
|
||||
end
|
||||
})
|
21
dump_pos.lua
21
dump_pos.lua
@ -1,21 +0,0 @@
|
||||
|
||||
-- /dump_pos
|
||||
-- prints all players with their current position into the logs
|
||||
-- best used for persistent lag which could be abm/position related (mesecons)
|
||||
minetest.register_chatcommand("dump_pos", {
|
||||
description = "Teleport you to spawn point.",
|
||||
privs = { ban = true },
|
||||
func = function(name, params)
|
||||
minetest.log(
|
||||
"warning",
|
||||
"[dump_pos] dumping player positions, initiated by player: " ..
|
||||
name .. " reason: " .. (params or "")
|
||||
)
|
||||
for _, player in ipairs(minetest.get_connected_players()) do
|
||||
local pname = player:get_player_name()
|
||||
local pos = player:get_pos()
|
||||
minetest.log("warning", "[dump_pos] Position of " .. pname .. ": " .. minetest.pos_to_string(pos))
|
||||
end
|
||||
return true, "positions dumped to log!"
|
||||
end
|
||||
})
|
18
init.lua
18
init.lua
@ -29,9 +29,6 @@ dofile(MP.."/fix_dead_on_login.lua")
|
||||
-- /spawn command
|
||||
dofile(MP.."/spawn.lua")
|
||||
|
||||
-- /dump_pos command
|
||||
dofile(MP.."/dump_pos.lua")
|
||||
|
||||
-- custom privs
|
||||
dofile(MP.."/privs.lua")
|
||||
|
||||
@ -89,9 +86,6 @@ dofile(MP.."/stats.lua")
|
||||
-- join priv set/revoke
|
||||
dofile(MP.."/join.lua")
|
||||
|
||||
-- no_announce priv
|
||||
dofile(MP.."/join_announce.lua")
|
||||
|
||||
-- craft overrides
|
||||
dofile(MP.."/crafts.lua")
|
||||
|
||||
@ -130,9 +124,6 @@ if minetest.get_modpath("spacecannon") then
|
||||
dofile(MP.."/spacecannon.lua")
|
||||
end
|
||||
|
||||
-- announce chat cmd's
|
||||
dofile(MP.."/announce.lua")
|
||||
|
||||
-- recipe redefinitions
|
||||
dofile(MP.."/recipes.lua")
|
||||
|
||||
@ -144,10 +135,11 @@ if minetest.get_modpath("player_monoids") then
|
||||
dofile(MP.."/spawn_fast_walk.lua")
|
||||
end
|
||||
|
||||
if minetest.settings:get_bool("enable_integration_test") then
|
||||
dofile(MP.."/integration_test.lua")
|
||||
end
|
||||
|
||||
-- custom powered stand from scifi_nodes
|
||||
if minetest.get_modpath("scifi_nodes") then
|
||||
dofile(MP.."/scifi_override.lua")
|
||||
end
|
||||
|
||||
if minetest.settings:get_bool("enable_integration_test") then
|
||||
dofile(MP.."/integration_test.lua")
|
||||
end
|
||||
|
@ -1,17 +0,0 @@
|
||||
local old_send_join_message = minetest.send_join_message
|
||||
|
||||
minetest.send_join_message = function(player_name)
|
||||
if minetest.check_player_privs(player_name, { no_announce=true }) then
|
||||
return
|
||||
end
|
||||
old_send_join_message(player_name)
|
||||
end
|
||||
|
||||
local old_send_leave_message = minetest.send_leave_message
|
||||
|
||||
minetest.send_leave_message = function(player_name, timed_out)
|
||||
if minetest.check_player_privs(player_name, { no_announce=true }) then
|
||||
return
|
||||
end
|
||||
old_send_leave_message(player_name, timed_out)
|
||||
end
|
@ -45,12 +45,6 @@ minetest.register_privilege("fly_event", {
|
||||
description = "can toggle global fly event"
|
||||
})
|
||||
|
||||
-- no announcements for the player
|
||||
minetest.register_privilege("no_announce", {
|
||||
description = "player does not get announced",
|
||||
give_to_singleplayer = false
|
||||
})
|
||||
|
||||
|
||||
-- jumpdrive
|
||||
minetest.register_privilege("jumpdrive_land", {
|
||||
|
Loading…
x
Reference in New Issue
Block a user