Difference for server/player.c from version 1.160 to 1.161


version 1.160 version 1.161
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_player_c =   * static char *rcsid_player_c =
  *   "$Id: player.c,v 1.160 2005/03/22 03:15:06 majorwoo Exp $";   *   "$Id: player.c,v 1.161 2005/05/06 21:10:25 tchize Exp $";
  */   */
   
 /*  /*
Line 77
 
Line 77
   
 void display_motd(object *op) {  void display_motd(object *op) {
     char buf[MAX_BUF];      char buf[MAX_BUF];
       char motd[HUGE_BUF];
     FILE *fp;      FILE *fp;
     int comp;      int comp;
       int size;
          
     sprintf(buf, "%s/%s", settings.confdir, settings.motd);      sprintf(buf, "%s/%s", settings.confdir, settings.motd);
     if ((fp=open_and_uncompress(buf, 0, &comp)) == NULL) {      if ((fp=open_and_uncompress(buf, 0, &comp)) == NULL) {
  return;   return;
     }      }
       motd[0]='\0';
       size=0;
     while (fgets(buf, MAX_BUF, fp) != NULL) {      while (fgets(buf, MAX_BUF, fp) != NULL) {
  char *cp;   char *cp;
  if( *buf == '#')   if( *buf == '#')
      continue;       continue;
  cp=strchr(buf, '\n');     /*cp=strchr(buf, '\n');   
  if (cp != NULL)   if (cp != NULL)
  *cp='\0';          *cp='\0';*/      
      new_draw_info(NDI_UNIQUE | NDI_GREEN, 0, op, buf);        strncat(motd+size,buf,HUGE_BUF-size);
         size+=strlen(buf);
     }      }
       draw_ext_info(NDI_UNIQUE | NDI_GREEN, 0, op, MSG_TYPE_MOTD, MSG_SUBTYPE_NONE, motd);
     close_and_delete(fp, comp);      close_and_delete(fp, comp);
     new_draw_info(NDI_UNIQUE, 0, op, " ");  
 }  }
   
 int playername_ok(char *cp) {  int playername_ok(char *cp) {


Legend:
line(s) removed in v.1.160 
line(s) changed
 line(s) added in v.1.161

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