Don't accept random input for 'yes' in CmdDestroy. Resolves #1968.
This commit is contained in:
parent
88a49334f2
commit
908dff6217
1 changed files with 6 additions and 2 deletions
|
|
@ -816,8 +816,12 @@ class CmdDestroy(COMMAND_DEFAULT_CLASS):
|
||||||
answer = yield (confirm)
|
answer = yield (confirm)
|
||||||
answer = self.default_confirm if answer == "" else answer
|
answer = self.default_confirm if answer == "" else answer
|
||||||
|
|
||||||
if answer.strip().lower() in ("n", "no"):
|
if answer and answer not in ("yes", "y", "no", 'n'):
|
||||||
caller.msg("Canceled: no object was destroyed.")
|
caller.msg("Canceled: Either accept the default by pressing "
|
||||||
|
"return or specify yes/no.")
|
||||||
|
delete = False
|
||||||
|
elif answer.strip().lower() in ("n", "no"):
|
||||||
|
caller.msg("Canceled: No object was destroyed.")
|
||||||
delete = False
|
delete = False
|
||||||
|
|
||||||
if delete:
|
if delete:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue