mirror of
https://github.com/Sokomine/locks.git
synced 2025-01-09 15:20:21 +01:00
Fix crash when a client sends empty fields
This commit is contained in:
parent
e789726fdf
commit
ce3ffa1985
7
init.lua
7
init.lua
@ -455,12 +455,7 @@ function locks:lock_handle_input( pos, formname, fields, player )
|
||||
|
||||
|
||||
-- is this input the lock is supposed to handle?
|
||||
if( ( not( fields.locks_sent_lock_command )
|
||||
or fields.locks_sent_lock_command == "" )
|
||||
and (fields.quit and (fields.quit==true or fields.quit=='true'))) then
|
||||
-- or not( fields.locks_sent_input )
|
||||
return;
|
||||
end
|
||||
if fields.quit or not fields.locks_sent_lock_command then return end
|
||||
|
||||
if( fields.locks_sent_lock_command == "/help" ) then
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user