Browse Source

Remove deprecated function,...

...update README.md, use mod.conf for dependencies and description. Deletes deprecated 'depends.txt'.
master
Panquesito7 8 months ago
parent
commit
6d52ffcda6
4 changed files with 11 additions and 10 deletions
  1. +7
    -7
      README.md
  2. +0
    -2
      depends.txt
  3. +1
    -1
      init.lua
  4. +3
    -0
      mod.conf

+ 7
- 7
README.md View File

@@ -1,14 +1,14 @@
# mysql_auth
# MySQL Authentication

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
a trusted mod (in the `secure.trusted_mods` config entry). There is **no** other solution to
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`.

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

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);

```lua
@@ -113,11 +113,11 @@ mysql_auth.db.db = minetest
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.


[mycn]: https://luapower.com/mysql#mysql.connectoptions_t---conn
[mycn]: https://luapower.com/mysql#mysql.connectoptions_t---conn

+ 0
- 2
depends.txt View File

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


+ 1
- 1
init.lua View File

@@ -16,7 +16,7 @@ end

local singleplayer = minetest.is_singleplayer() -- Caching is OK since you can't open a game to
-- 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")
return
end


+ 3
- 0
mod.conf View File

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

Loading…
Cancel
Save