View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000690 | LDMud | Runtime | public | 2009-10-15 09:44 | 2021-04-16 22:30 |
| Reporter | _xtian_ | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | won't fix | ||
| Summary | 0000690: returning -1 from modify_command() still prints prompt | ||||
| Description | The 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 Information | If 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(). | ||||
| Tags | No tags attached. | ||||
| External Data (URL) | |||||
|
|
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. |
|
|
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. |