Remove deprecated function,...

...update README.md, use mod.conf for dependencies and description. Deletes deprecated 'depends.txt'.
This commit is contained in:
Panquesito7 2019-09-23 19:57:50 -05:00
parent 67dc261bd0
commit 6d52ffcda6
4 changed files with 11 additions and 10 deletions

View File

@ -1,14 +1,14 @@
# mysql_auth # MySQL Authentication
Plug Minetest's auth mechanism into a MySQL database. Plug Minetest's auth mechanism into a MySQL database.
# Configuration ## Configuration
First, if mod security is enabled (`secure.enable_security = true`), this mod must be added as First, if mod security is enabled (`secure.enable_security = true`), this mod must be added as
a trusted mod (in the `secure.trusted_mods` config entry). There is **no** other solution to a trusted mod (in the `secure.trusted_mods` config entry). There is **no** other solution to
make it work under mod security. make it work under mod security.
By default `mysql_auth` doesn't run in singleplayer. This can be overriden by setting By default, `mysql_auth` doesn't run in singleplayer. This can be overriden by setting
`mysql_auth.enable_singleplayer` to `true`. `mysql_auth.enable_singleplayer` to `true`.
Configuration may be done as regular Minetest settings entries, or using a config file, allowing Configuration may be done as regular Minetest settings entries, or using a config file, allowing
@ -37,7 +37,7 @@ db.db = nil -- <== Setting this is required
### Lua table config file ### Lua table config file
Connection options are passed as a table through the `db.connopts` entry. Connection options are passed as a table through the `db.connopts` entry.
Its format must be the same as [LuaPower's MySQL module `mysql.connect(options_t)` function][mycn], It's format must be the same as [LuaPower's MySQL module `mysql.connect(options_t)` function][mycn],
that is (all members are optional); that is (all members are optional);
```lua ```lua
@ -113,11 +113,11 @@ mysql_auth.db.db = minetest
mysql_auth.db.tables.auth.name = skyblock_auths mysql_auth.db.tables.auth.name = skyblock_auths
``` ```
# License ## License
`mysql_auth` is licensed under [LGPLv3](https://www.gnu.org/licenses/lgpl.html). `mysql_auth` is licensed under [GNU LGPLv3](https://www.gnu.org/licenses/lgpl.html).
Using the Public Domain-licensed LuaPower `mysql` module. Using the Public Domain-licensed LuaPower `mysql` module.
[mycn]: https://luapower.com/mysql#mysql.connectoptions_t---conn [mycn]: https://luapower.com/mysql#mysql.connectoptions_t---conn

View File

@ -1,2 +0,0 @@
mysql_base

View File

@ -16,7 +16,7 @@ end
local singleplayer = minetest.is_singleplayer() -- Caching is OK since you can't open a game to local singleplayer = minetest.is_singleplayer() -- Caching is OK since you can't open a game to
-- multiplayer unless you restart it. -- multiplayer unless you restart it.
if not minetest.setting_get(modname .. '.enable_singleplayer') and singleplayer then if not minetest.settings:get(modname .. '.enable_singleplayer') and singleplayer then
LogI("Not adding auth handler because of singleplayer game") LogI("Not adding auth handler because of singleplayer game")
return return
end end

3
mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = mysql_auth
depends = mysql_base
description = Source auth entries in a MySQL database.