View Issue Details

IDProjectCategoryView StatusLast Update
0000690LDMudRuntimepublic2021-04-16 22:30
Reporter_xtian_ Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
Summary0000690: returning -1 from modify_command() still prints prompt
DescriptionThe manpage of modify_command() states:
  If the result is a non-zero number, the given command is to
  be ignored.

This may be useful to gag input from the player or for hidden client<->server communication.

But in backend.c print_prompt() will always be called, even in this case.

So the player will see a prompt without his input showing.

I find it much more interesting to be able to completely gag the player input, whithout showing his prompt.
Additional InformationIf there should be a reason to keep the old behaviour one could offer both possibilities (gag prompt / not gag prompt) by returning different numerical non-zero values from modify_command().
TagsNo tags attached.
External Data (URL)

Activities

Gnomi

2009-10-15 10:22

manager   ~0001519

Our modify_command does history expansion and when that fails it returns 1, so that the command is not executed. There are also some circumstances where the player is not allowed to execute certain commands, that is also taken care of by modify_command. In these cases I'd like a prompt to be shown.

Gnomi

2021-04-16 22:30

manager   ~0002621

The prompt is printed for the next input to be received (a pending input_to or expected command), therefore it is correct to print one.
The mudlib however can influence that with the H_PRINT_PROMPT hook.

Therefore we think that this use case doesn't need to be implemented in the driver.

Issue History

Date Modified Username Field Change
2009-10-15 09:44 _xtian_ New Issue
2009-10-15 10:22 Gnomi Note Added: 0001519
2021-04-16 22:30 Gnomi Status new => closed
2021-04-16 22:30 Gnomi Resolution open => won't fix
2021-04-16 22:30 Gnomi Note Added: 0002621