Whois command [by Primacy]
Snippet Posted Wednesday, August 12th @ 11:39:05 PM, by George Greer in the Commands dept.
. Click the link below to read it or download it.

From: Primacy <jmrobins@wired.uvm.edu>
Subject: [Circle] CODE: WHOIS command

If anyone is interested, here is some code for a whois command.
Thanks to Ron Hensley <ron@peace.dmv.com> for the bug fixes.

----- 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, "Level %d %s\r\n", GET_LEVEL(victim),


class_abbrevs[(int) GET_CLASS(victim)]);
        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 },





<< who -> html for web pages [by Erik Niese-Petersen] | Reply | View as text | Flattened | Who level sorting [by George] >>

 


Related Links
  Wired
download
Related Articles
More by greerga
 
 

CircleMUD Snippets
 
Note: Not all of these snippets will work perfectly with your version of code, so be prepared to fix one or two bugs that may arise, and please let me know what you needed to do to fix it. Sending a corrected version is always welcome.
Finally, if you wish to use any of the snippets from this page, you are more than welcome, just mention the authors in your credits. If you wish to release any of these snippets to the public on another site, contact me FIRST.