MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | /* These sefuns are to provide a replacement for the efuns enable_commands() |
| 2 | * and disable_commands(). |
| 3 | * Feel free to add it to your mudlibs, if you have much code relying on that. |
| 4 | */ |
| 5 | |
| 6 | #include <configuration.h> |
| 7 | |
| 8 | #if ! __EFUN_DEFINED__(enable_commands) |
| 9 | |
| 10 | void enable_commands() |
| 11 | { |
| 12 | object ob = efun::previous_object(); |
| 13 | |
| 14 | efun::configure_object(ob, OC_COMMANDS_ENABLED, 1); |
| 15 | efun::set_this_player(ob); |
| 16 | } |
| 17 | |
| 18 | #endif |
| 19 | |
| 20 | #if ! __EFUN_DEFINED__(disable_commands) |
| 21 | |
| 22 | void disable_commands() |
| 23 | { |
| 24 | object ob = efun::previous_object(); |
| 25 | |
| 26 | efun::configure_object(ob, OC_COMMANDS_ENABLED, 0); |
| 27 | efun::set_this_player(0); |
| 28 | } |
| 29 | |
| 30 | #endif |