If anyone is interested, here is some code for a whois command. ----- act.informative.c ---- ACMD(do_whois) { struct char_data *victim = 0; struct char_file_u tmp_store; skip_spaces(&argument); if (!*argument) { send_to_char("Do a WhoIS on which player?\r\n", ch); } else { CREATE(victim, struct char_data, 1); clear_char(victim); if (load_char(argument, &tmp_store) > -1) { store_to_char(&tmp_store, victim); sprintf(buf, "%sLevel %d %s\r\n", buf, GET_LEVEL(ch), class_abbrevs[(int) GET_CLASS(ch)]); send_to_char(buf, ch); } else { send_to_char("There is no such player.\r\n", ch); } free(victim); } } ---- interpreter.c ---- ACMD(do_whois) { "whois", POS_DEAD, do_whois, 0, 0 }, Justin Robinson jmrobins@wired.uvm.edu +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/07/00 PST