Remove extraneous do..end block

This commit is contained in:
Dorian Wouters 2017-06-01 17:39:37 -04:00
parent 5c758ba5b1
commit e5801a1e0c
No known key found for this signature in database
GPG Key ID: 6E9DA8063322434B
1 changed files with 16 additions and 17 deletions

View File

@ -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