Re: Fili - Redoing the clan code

From: Chuck Reed (master@I-55.COM)
Date: 08/25/98


>Ahh yes: if you use the clan code snippet off the _snippets site_ ,
>PERSONALLY email me. I am doing an overhaul of it and am wondering
>whether to release it or not. I emailed the author to get their
>comments, but they didn't reply, sooo......

Something I should point out about this.  I wrote my own clan code using
some of the functions that snippet used, and my player table kept
corrupting.  There is something called

struct char_data *is_playing(char *arg)

Or something like that, and quite often, you will want to call it using
is_playing((player_table + j)->name), but is_playing trashes the argument
passed to it
by default.  You should  do something like

struct char_data *is_playing(char *vict_name)
{
  extern struct descriptor_data *descriptor_list;
  struct descriptor_data *i, *next_i;
  char new_vict_name[30];

  strcpy(new_vict_name, vict_name); // Temporary buffer we can trash
  for (i = descriptor_list; i; i = next_i) {
    next_i = i->next;
    if(i->connected == CON_PLAYING &&
!strcmp(i->character->player.name,CAP(new_vict_name)))
      return i->character;
     }
  return NULL;
}

Hope that helps a bit.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST