Difference for server/c_party.c from version 1.14 to 1.15


version 1.14 version 1.15
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_party_c =   * static char *rcsid_c_party_c =
  *   "$Id: c_party.c,v 1.14 2005/09/25 02:15:45 cavesomething Exp $";   *   "$Id: c_party.c,v 1.15 2005/09/25 09:47:23 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 35
 
Line 35
 static partylist * firstparty=NULL; /* Keeps track of first party in list */  static partylist * firstparty=NULL; /* Keeps track of first party in list */
 static partylist * lastparty=NULL; /*Keeps track of last party in list */  static partylist * lastparty=NULL; /*Keeps track of last party in list */
   
   void remove_party(partylist *target_party);
   
 /* Forms the party struct for a party called 'params'. it is the responsibility  /* Forms the party struct for a party called 'params'. it is the responsibility
  * of the caller to ensure that the name is unique, and that it is placed in the    * of the caller to ensure that the name is unique, and that it is placed in the
  * main party list correctly */   * main party list correctly */
Line 73
 
Line 75
     return newparty;      return newparty;
 }  }
   
 int remove_party(partylist *target_party) {  void remove_party(partylist *target_party) {
     partylist *tmpparty;      partylist *tmpparty;
     partylist *previousparty;      partylist *previousparty;
     partylist *nextparty;      partylist *nextparty;
Line 82
 
Line 84
     if (firstparty==NULL) {      if (firstparty==NULL) {
  LOG(llevError, "remove_party(): I was asked to remove party %s, but no parties are defined",   LOG(llevError, "remove_party(): I was asked to remove party %s, but no parties are defined",
      target_party->partyname);       target_party->partyname);
  return 1;   return;
     }      }
     for (pl=first_player;pl!=NULL;pl=pl->next)      for (pl=first_player;pl!=NULL;pl=pl->next)
  if (pl->party==target_party) pl->party=NULL;   if (pl->party==target_party) pl->party=NULL;
Line 93
 
Line 95
  if (target_party->partyleader) free(target_party->partyleader);   if (target_party->partyleader) free(target_party->partyleader);
  if (target_party->partyname) free(target_party->partyname);   if (target_party->partyname) free(target_party->partyname);
  free(target_party);   free(target_party);
  return 0;    return;
     }      }
     else if (target_party == lastparty) {      else if (target_party == lastparty) {
  for (tmpparty=firstparty;tmpparty->next!=NULL;tmpparty->next) {   for (tmpparty=firstparty;tmpparty->next!=NULL;tmpparty->next) {
Line 102
 
Line 104
  if (target_party->partyleader) free(target_party->partyleader);   if (target_party->partyleader) free(target_party->partyleader);
  if (target_party->partyname) free(target_party->partyname);   if (target_party->partyname) free(target_party->partyname);
  free(target_party);    free(target_party);
  return 0;   return;
      }       }
  }   }
     }      }
Line 116
 
Line 118
      if (target_party->partyleader) free(target_party->partyleader);       if (target_party->partyleader) free(target_party->partyleader);
      if (target_party->partyname) free(target_party->partyname);       if (target_party->partyname) free(target_party->partyname);
      free(target_party);        free(target_party);
      return 0;       return;
  }   }
 }  }
   
Line 353
 
Line 355
   } /* form */    } /* form */
   
   if(strcmp(params, "leave")==0) {    if(strcmp(params, "leave")==0) {
     int player_count;  
     player *pl;  
     if(op->contr->party==NULL)      if(op->contr->party==NULL)
       {        {
         new_draw_info(NDI_UNIQUE, 0,op,"You are not a member of any party.");          new_draw_info(NDI_UNIQUE, 0,op,"You are not a member of any party.");


Legend:
line(s) removed in v.1.14 
line(s) changed
 line(s) added in v.1.15

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:29