/* do_as Attaches the immortal's descriptor to the character, then executes a command, so the immortal sees the output. Like a cross between snoop and force. */ void do_as(CHAR_DATA *ch, char *argument) { char arg[MAX_STRING_LENGTH]; CHAR_DATA *target; DESCRIPTOR_DATA *temp; argument = one_argument(argument, arg); target = get_char_world(ch, arg); if (target == NULL) { send_to_char("As who what?\n\r", ch); return; } if (!IS_NPC(target) && get_trust(ch) <= get_trust(target)) { send_to_char("I don't think so.\n\r", ch); return; } /* any commands that might screw with the descriptors should probably be blocked */ if (!str_prefix(argument, "quit") || !str_prefix(argument, "delete") || !str_prefix(argument, "switch")) { send_to_char("You will need to use the 'force' command!\n\r", ch); return; } temp = target->desc; target->desc = ch->desc; interpret(target, argument); target->desc = temp; }