Go to file
shivajiva101 34b4cd1e0c
add iterate function to auth handler
auth_table is a local cache so provide a method of returning the full list of names
2018-04-05 17:51:41 +01:00
.gitignore Initial commit 2017-10-01 17:56:09 +01:00
LICENSE Update LICENSE 2017-10-01 17:57:37 +01:00
README.md Update README.md 2017-11-02 14:39:00 +00:00
init.lua add iterate function to auth handler 2018-04-05 17:51:41 +01:00
mod.conf Create mod.conf 2017-10-01 18:01:34 +01:00

README.md

sauth

An alternative auth handler for minetest using SQLite. Capable of handling large player databases whilst reducing the associated lag of having thousands of auth entries sat in memory. Only the players logged in are held in memory to act as cache, resulting in an increased playability experience.

Requires:

I suggest you use luarocks(https://luarocks.org/) to install lsqlite3.

If the target server runs mods in secure mode[recommended], you must add sauth to the list of trusted mods in minetest.conf:

secure.trusted_mods = sauth

This mod will import your existing auth.txt on first run if there are less than 3600 records, otherwise it exports SQL block insert statements to a file called auth.sql in the world folder and shuts the server down. Server owners be aware that it is a requirement that you import the database BEFORE restarting minetest or the server will create another database and duplicate entries for any players logging in before the import. You can shutdown the server and delete sauth.sqlite if you forgot and then do the import steps. I recommend you import auth.sql with sqlite3 (https://www.sqlite.org/), navigate to the world folder in a terminal and use the commands:

sqlite3
.open sauth.sqlite
.read auth.sql
.exit

Either way it will rename the original auth.txt to auth.txt.bak as it is not required for multiplayer games.

To enable the mod for singleplayer add:

sauth.enable_singleplayer = true

to minetest.conf before starting the server.

If you use player database you can easily keep the auth database clean of orphan entries using the shell script posted here https://forum.minetest.net/viewtopic.php?f=9&t=18604#p297350 by sofar.