15-- by gera, public domain 02local15 11file_path15 =15 11minetest.07get_worldpath()15 ..15 05"05/online_players.txt05" 02function15 07erase_player_list() 15 11minetest.07safe_file_write(11file_path15 ,15 05"05") 02end 02function15 07dump_player_list() 15 02local15 11players15 =15 11minetest.07get_connected_players() 15 02local15 11str15 =15 05"05" 15 02for15 11i15 =15 021,15 #11players15 02do 15 11str15 =15 11str15 ..15 11players[11i]:07get_player_name()15 ..15 05"05\n05" 15 02end 15 11minetest.07safe_file_write(11file_path,15 11str) 02end 11minetest.07register_on_mods_loaded(11erase_player_list) 11minetest.07register_on_joinplayer(11dump_player_list) 11minetest.07register_on_leaveplayer(11dump_player_list) 11minetest.07register_on_shutdown(11erase_player_list)