Or make an alias: alias delete set $1 deleted on; at $1 purge $1; set file $1 deleted on One line, and it handles offline players too! Wow! ;-) The extract_char mightn't be a great idea unless you don't mind their eq just lying around. Unless my memory of how extract_char works is faulty, anyway. If you like the snippet, go ahead and use it of course. Might be good if you're frequently promoting players and want to go on a deleting spree, but for a small number of immortals the alias may be sufficient. On Tue, 12 Jan 1999, Erik Lundin wrote: > Hi everyone.. Here's a snippet to use on those whining maggots. > This command is used to "delete" players. Go figure. Use it > carefully. > > > /* ADD THIS(somewhere in act.wizard.c)*/ > ACMD(do_delete) > { > struct char_data *vict; > one_argument(argument, buf); > > if(!*buf) { > send_to_char("Who do you want to delete?\r\n", ch); > return; > } > if ((vict = get_char_vis(ch, buf))) { > if (!IS_NPC(vict) && (GET_LEVEL(ch) <= GET_LEVEL(vict))) { > send_to_char("I don't think so.\r\n", ch); > return; > } > SET_BIT(PLR_FLAGS(vict), PLR_DELETED); > if(PLR_FLAGGED(vict, PLR_DELETED)) { > sprintf(buf2, "[Info] : %s has been deleted by %s.\r\n", > GET_NAME(vict), > GET_NAME(ch)); > send_to_all(buf2); > } else { > return; > } > close_socket(vict->desc); > extract_char(vict); /* Bye Bye */ > send_to_char("Deleted.\r\n", ch); > > } else { > send_to_char("That player isn't online.\r\n", ch); > } > } > /*END(Save file)*/ > > Ok. Now open interpreter.c and fine this line: > > ACMD(do_dc); > > and add this line below: > > ACMD(do_delete); > > should now look like this: > > ACMD(do_credits); > ACMD(do_dc); > ACMD(do_delete); /* This is our line */ > ACMD(do_diagnose); > etc etc... > > Now find: > > { "dc" , POS_DEAD , do_dc , LVL_GOD, 0 }, > > and add this line below: > > { "delete" , POS_DEAD , do_delete , LVL_GOD, 0 }, > > Compile and yer done! > That wasn't to hard.. or? > > Regards > /Erik Lundin > cyrius@boden.mail.telia.com > > > +------------------------------------------------------------+ > | Ensure that you have read the CircleMUD Mailing List FAQ: | > | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | > +------------------------------------------------------------+ > +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST