Difference for server/c_object.c from version 1.74 to 1.75


version 1.74 version 1.75
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_object_c =   * static char *rcsid_c_object_c =
  *   "$Id: c_object.c,v 1.74 2005/11/16 08:16:08 mwedel Exp $";   *   "$Id: c_object.c,v 1.75 2006/01/11 02:03:29 cavesomething Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 1767
 
Line 1767
 int command_rename_item(object *op, char *params)  int command_rename_item(object *op, char *params)
 {  {
   char buf[VERY_BIG_BUF];    char buf[VERY_BIG_BUF];
     int itemnumber;
   object *item=NULL;    object *item=NULL;
   char *closebrace;    char *closebrace;
   size_t counter;    size_t counter;
Line 1777
 
Line 1777
     while(' '==*params) params++;      while(' '==*params) params++;
   
     /* Checking the first part */      /* Checking the first part */
     if ('<'==*params) {      if (itemnumber = atoi(params)) {
    for (item=op->inv; item && ((item->count != itemnumber) || item->invisible); item=item->below);
    if (!item) {
        new_draw_info(NDI_UNIQUE,0,op,"Tried to rename an invalid item.");
        return 1;
    }
    params = strchr(params, ' ');
    if (params) params++;
       }
       else if ('<'==*params) {
       /* Got old name, let's get it & find appropriate matching item */        /* Got old name, let's get it & find appropriate matching item */
       closebrace=strchr(params,'>');        closebrace=strchr(params,'>');
       if(!closebrace) {        if(!closebrace) {


Legend:
line(s) removed in v.1.74 
line(s) changed
 line(s) added in v.1.75

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