forked from Sokomine/yl_speak_up
ignore leading/tailing whitespaces when checking password
This commit is contained in:
parent
827020d167
commit
cea602230f
@ -565,8 +565,9 @@ yl_speak_up.input_fs_action_text_input = function(player, formname, fields)
|
||||
end
|
||||
if(fields.finished_action and fields.quest_answer and fields.quest_answer ~= "") then
|
||||
-- is the answer correct?
|
||||
-- TODO: strip leading and tailing blanks?
|
||||
local success = not(not(fields.quest_answer and fields.quest_answer == a.a_value))
|
||||
-- strip leading and tailing blanks
|
||||
local success = not(not(fields.quest_answer and a.a_value
|
||||
and fields.quest_answer:trim() == a.a_value:trim()))
|
||||
-- the action was a either a success or failure
|
||||
yl_speak_up.execute_next_action(player, a_id, success)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user