MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 2 | int remove_input_to(object player) |
| 3 | int remove_input_to(object player, string fun) |
| 4 | int remove_input_to(object player, closure fun) |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 5 | int remove_input_to(object player, object|lwobject fun) |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 6 | int remove_input_to(object player, object|lwobject ob, string fun) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 7 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 8 | DESCRIPTION |
| 9 | Remove a pending input_to from the interactive <player> object. |
| 10 | If the optional <fun> is not given, the most recently added input_to |
| 11 | is removed. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 12 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 13 | If the optional <fun> is given, the efun tries to find and remove the |
| 14 | most recently added input_to matching the <fun> argument: |
| 15 | - <fun> is a string: the input_to functionname has to match |
| 16 | - <fun> is an object: the object the input_to function is bound to |
| 17 | has to match |
| 18 | - <fun> is a closure: the input_to closure has to match. |
| 19 | - <ob> and <fun> are given: both the object and the functionname |
| 20 | have to match |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 21 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 22 | Return 1 on success, or 0 on failure (no input_to found, object is |
| 23 | not interactive or has no input_to pending). |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 24 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 25 | EXAMPLES |
| 26 | Remove all pending input_to from the current user, if any. |
| 27 | while (remove_input_to(this_interactive())) ; |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 28 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 29 | HISTORY |
| 30 | Introduced in LDMud 3.2.9 / 3.3.119. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 31 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 32 | SEE ALSO |
| 33 | input_to(E), find_input_to(E), input_to_info(E), query_input_pending(E) |