minetest.register_on_chat_message(function(name, message, playername, player) local cmd ="/spawn" if message:sub(0, #cmd) == cmd then if message == '/spawn' then local player = minetest.env:get_player_by_name(name) local spawnPoint = minetest.setting_get("static_spawnpoint") minetest.get_player_by_name(name):setpos(minetest.string_to_pos(spawnPoint)) minetest.chat_send_player(name, "Teleported to spawn!") return true end end local cmd ="/away" if message:sub(0, #cmd) == cmd then if message == '/away' then local player = minetest.env:get_player_by_name(name) minetest.chat_send_all(name.." is now away from keyboard!") irc:say(string.format('*** %s is now away from keyboard.', player:get_player_name())) return true --deds to sfan5 end end local cmd ="/re" if message:sub(0, #cmd) == cmd then if message == '/re' then local player = minetest.env:get_player_by_name(name) minetest.chat_send_all(name.." is no longer away from keyboard!") irc:say(string.format('*** %s is no longer away from keyboard.', player:get_player_name())) return true end end local cmd ="/hacmd" if message:sub(0, #cmd) == cmd then if message == '/hacmd' then --local player = minetest.env:get_player_by_name(name) minetest.chat_send_all("additional Commands") minetest.chat_send_all("===================") minetest.chat_send_all("use /away for afk note from server.") minetest.chat_send_all("use /re for no-longer-afk note from server.") minetest.chat_send_all("use /spawn to teleporting you to the spawnpoint.") minetest.chat_send_all("use /helpcmdplus to show this helpmessage.") return true end end local cmd ="/helpcmdplus" if message:sub(0, #cmd) == cmd then if message == '/helpcmdplus' then local player = minetest.env:get_player_by_name(name) minetest.chat_send_all("additional Comands") minetest.chat_send_all("==================") minetest.chat_send_player(player:get_player_name(),"use /away for afk note from server.") minetest.chat_send_player(player:get_player_name(),"use /re for no-longer-afk note from server.") minetest.chat_send_player(player:get_player_name(),"use /spawn to teleporting you to the Spawnpoint.") return true end end end) --Deds to Kahrl minetest.register_on_newplayer(function(player) player:setpos(spawn) return true end) --Deds to Kahrl minetest.register_on_respawnplayer(function(player, pos) player:setpos(spawn) return true end)