MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | /* This sefun is to provide a replacement for the efun set_prompt(). |
| 2 | * Feel free to add it to your mudlibs, if you have much code relying on that. |
| 3 | */ |
| 4 | |
| 5 | #if ! __EFUN_DEFINED__(set_prompt) |
| 6 | |
| 7 | #include <configuration.h> |
| 8 | |
| 9 | varargs string|closure set_prompt(string|closure|int prompt, object ob) |
| 10 | { |
| 11 | ob ||= efun::this_player(); |
| 12 | |
| 13 | mixed oldprompt = efun::interactive_info(ob, IC_PROMPT); |
| 14 | |
| 15 | if(!intp(prompt)) |
| 16 | efun::configure_interactive(ob, IC_PROMPT, prompt); |
| 17 | |
| 18 | return oldprompt; |
| 19 | } |
| 20 | |
| 21 | #endif |