mirror of
https://github.com/MinetestForFun/mysql_auth.git
synced 2025-01-08 00:50:25 +01:00
Remove extraneous do..end block
This commit is contained in:
parent
5c758ba5b1
commit
e5801a1e0c
33
init.lua
33
init.lua
@ -194,23 +194,22 @@ do
|
|||||||
thismod.table_exists = table_exists
|
thismod.table_exists = table_exists
|
||||||
|
|
||||||
local auth_table_created
|
local auth_table_created
|
||||||
do -- Auth table existence check and setup
|
-- Auth table existence check and setup
|
||||||
if not table_exists(tables.auths.name) then
|
if not table_exists(tables.auths.name) then
|
||||||
-- Auth table doesn't exist, create it
|
-- Auth table doesn't exist, create it
|
||||||
local S = tables.auths.schema
|
local S = tables.auths.schema
|
||||||
conn:query('CREATE TABLE ' .. tables.auths.name .. ' (' ..
|
conn:query('CREATE TABLE ' .. tables.auths.name .. ' (' ..
|
||||||
S.userid .. ' ' .. S.userid_type .. ' NOT NULL AUTO_INCREMENT,' ..
|
S.userid .. ' ' .. S.userid_type .. ' NOT NULL AUTO_INCREMENT,' ..
|
||||||
S.username .. ' ' .. S.username_type .. ' NOT NULL,' ..
|
S.username .. ' ' .. S.username_type .. ' NOT NULL,' ..
|
||||||
S.password .. ' ' .. S.password_type .. ' NOT NULL,' ..
|
S.password .. ' ' .. S.password_type .. ' NOT NULL,' ..
|
||||||
S.privs .. ' ' .. S.privs_type .. ' NOT NULL,' ..
|
S.privs .. ' ' .. S.privs_type .. ' NOT NULL,' ..
|
||||||
S.lastlogin .. ' ' .. S.lastlogin_type .. ',' ..
|
S.lastlogin .. ' ' .. S.lastlogin_type .. ',' ..
|
||||||
'PRIMARY KEY (' .. S.userid .. '),' ..
|
'PRIMARY KEY (' .. S.userid .. '),' ..
|
||||||
'UNIQUE (' .. S.username .. ')' ..
|
'UNIQUE (' .. S.username .. ')' ..
|
||||||
')')
|
')')
|
||||||
minetest.log('action', modname .. " created table '" .. dbname .. "." .. tables.auths.name ..
|
minetest.log('action', modname .. " created table '" .. dbname .. "." .. tables.auths.name ..
|
||||||
"'")
|
"'")
|
||||||
auth_table_created = true
|
auth_table_created = true
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local S = tables.auths.schema
|
local S = tables.auths.schema
|
||||||
|
Loading…
Reference in New Issue
Block a user