Difference for socket/request.c from version 1.9 to 1.10


version 1.9 version 1.10
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_init_c =   * static char *rcsid_init_c =
  *    "$Id: request.c,v 1.9 2001/04/07 03:57:00 michtoen Exp $";   *    "$Id: request.c,v 1.10 2001/04/09 00:57:04 michtoen Exp $";
  */   */
   
 /*  /*
Line 96
 
Line 96
    
 _setup_map setup_map[] = {   _setup_map setup_map[] = {
  {"sound", SETUP_SOUND},    {"sound", SETUP_SOUND},
    {"sexp", SETUP_SKILLEXP},
  {"",-1} /* end marker */    {"",-1} /* end marker */
 };   };
   
Line 162
 
Line 163
  ns->sound = atoi(param);    ns->sound = atoi(param);
  strcat(cmdback, param);    strcat(cmdback, param);
  break;    break;
    case SETUP_SKILLEXP:
   #ifdef ALLOW_SKILLS /* new experience system */
    ns->skillexp = atoi(param);
    strcat(cmdback, param);
   #else
    strcat(cmdback, "0");
   #endif
    break;
  };    };
  break; /* we have found cmd, fetch next from setup buffer */    break; /* we have found cmd, fetch next from setup buffer */
    
Line 191
 
Line 200
 {  {
     Settings oldsettings;      Settings oldsettings;
     oldsettings=settings;      oldsettings=settings;
   
     if (ns->status != Ns_Add || add_player(ns)) {      if (ns->status != Ns_Add || add_player(ns)) {
  Write_String_To_Socket(ns, "addme_failed",12);   Write_String_To_Socket(ns, "addme_failed",12);
     } else {      } else {
Line 396
 
Line 404
 void VersionCmd(char *buf, int len,NewSocket *ns)  void VersionCmd(char *buf, int len,NewSocket *ns)
 {  {
     char *cp;      char *cp;
    char version_warning[256];
   
     if (!buf) {      if (!buf) {
  LOG(llevError, "CS: received corrupted version command\n");   LOG(llevError, "CS: received corrupted version command\n");
Line 419
 
Line 428
     }      }
     cp = strchr(cp+1, ' ');      cp = strchr(cp+1, ' ');
     if (cp)      if (cp)
  LOG(llevDebug,"CS: connection from client of type %s\n", cp);   {
    LOG(llevDebug,"CS: connection from client of type <%s>\n", cp);
   
    /* This is first implementation - i skip all beta DX clients with it
    * Add later stuff here for other clients
    */
   
    if(!strcmp(" CF DX CLIENT", cp)) // these are old dxclients
    {
    sprintf(version_warning,"drawinfo %d %s", NDI_RED, "**** VERSION WARNING ****");
    Write_String_To_Socket(ns, version_warning, strlen(version_warning));
    sprintf(version_warning,"drawinfo %d %s", NDI_RED, "**** CLIENT IS TO OLD!! UPDATE THE CLIENT!! ****");
    Write_String_To_Socket(ns, version_warning, strlen(version_warning));
    }
    }
 }  }
   
 /*  /*
Line 590
 
Line 613
     AddIfShort(pl->last_stats.Dex, pl->ob->stats.Dex, CS_STAT_DEX);      AddIfShort(pl->last_stats.Dex, pl->ob->stats.Dex, CS_STAT_DEX);
     AddIfShort(pl->last_stats.Con, pl->ob->stats.Con, CS_STAT_CON);      AddIfShort(pl->last_stats.Con, pl->ob->stats.Con, CS_STAT_CON);
     AddIfShort(pl->last_stats.Cha, pl->ob->stats.Cha, CS_STAT_CHA);      AddIfShort(pl->last_stats.Cha, pl->ob->stats.Cha, CS_STAT_CHA);
   #ifdef ALLOW_SKILLS /* new experience system */
       if(pl->last_stats.exp != pl->ob->stats.exp && pl->socket.skillexp)
       {
    int s;
    for(s=0;s<pl->last_skill_index;s++)
           {
    AddIfInt(pl->last_skill_exp[s],pl->last_skill_ob[s]->stats.exp , pl->last_skill_id[s]);
    AddIfInt(pl->last_skill_level[s],pl->last_skill_ob[s]->level , pl->last_skill_id[s]+1);
           }
       }
   #endif   
     AddIfInt(pl->last_stats.exp, pl->ob->stats.exp, CS_STAT_EXP);      AddIfInt(pl->last_stats.exp, pl->ob->stats.exp, CS_STAT_EXP);
     AddIfShort(pl->last_level, pl->ob->level, CS_STAT_LEVEL);      AddIfShort(pl->last_level, pl->ob->level, CS_STAT_LEVEL);
     AddIfShort(pl->last_stats.wc, pl->ob->stats.wc, CS_STAT_WC);      AddIfShort(pl->last_stats.wc, pl->ob->stats.wc, CS_STAT_WC);


Legend:
line(s) removed in v.1.9 
line(s) changed
 line(s) added in v.1.10

File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:38