blob: 0b59692364d23e21a731e24a120141c79e5ba5a4 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001/* 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
9varargs 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