Difference for server/c_misc.c from version 1.77 to 1.78


version 1.77 version 1.78
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_misc_c =   * static char *rcsid_c_misc_c =
  *   "$Id: c_misc.c,v 1.77 2006/03/18 15:05:37 ryo_saeba Exp $";   *   "$Id: c_misc.c,v 1.78 2006/05/20 12:36:48 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 312
 
Line 312
     int num_players = 0;      int num_players = 0;
     int num_wiz = 0;      int num_wiz = 0;
     int num_afk = 0;      int num_afk = 0;
       int num_bot = 0;
     chars_names *chars = NULL;      chars_names *chars = NULL;
          
     /*       /*
Line 321
 
Line 322
      * new formats have been specified, and if not we will use the old defaults.       * new formats have been specified, and if not we will use the old defaults.
      */       */
     if (!strcmp(settings.who_format,""))       if (!strcmp(settings.who_format,""))
     strcpy(settings.who_format, "%N_%T%t%h%d%n[%m]");      strcpy(settings.who_format, "%N_%T%t%h%d%b%n[%m]");
     if (!strcmp(settings.who_wiz_format,""))       if (!strcmp(settings.who_wiz_format,""))
     strcpy(settings.who_wiz_format, "%N_%T%t%h%d%nLevel %l [%m](@%i)(%c)");      strcpy(settings.who_wiz_format, "%N_%T%t%h%d%b%nLevel %l [%m](@%i)(%c)");
     if (op == NULL || QUERY_FLAG(op, FLAG_WIZ))      if (op == NULL || QUERY_FLAG(op, FLAG_WIZ))
     format=settings.who_wiz_format;      format=settings.who_wiz_format;
     else      else
Line 353
 
Line 354
        num_wiz++;         num_wiz++;
      if (QUERY_FLAG(pl->ob,FLAG_AFK))       if (QUERY_FLAG(pl->ob,FLAG_AFK))
        num_afk++;         num_afk++;
    if (pl->socket.is_bot)
    num_bot++;
  }   }
     }      }
     if (first_player != (player *) NULL) {      if (first_player != (player *) NULL) {
     if (reg == NULL)       if (reg == NULL)
             new_draw_info_format(NDI_UNIQUE, 0, op, "Total Players (%d) -- WIZ(%d) AFK(%d)",    new_draw_info_format(NDI_UNIQUE, 0, op, "Total Players (%d) -- WIZ(%d) AFK(%d) BOT(%d)",
            num_players, num_wiz, num_afk);             num_players, num_wiz, num_afk, num_bot);
  else if (reg->longname == NULL)   else if (reg->longname == NULL)
      new_draw_info_format(NDI_UNIQUE, 0, op, "Total Players in %s (%d) -- WIZ(%d) AFK(%d)",        new_draw_info_format(NDI_UNIQUE, 0, op, "Total Players in %s (%d) -- WIZ(%d) AFK(%d) BOT(%d)",
            reg->name, num_players, num_wiz, num_afk);   reg->name, num_players, num_wiz, num_afk, num_bot);
  else   else
      new_draw_info_format(NDI_UNIQUE, 0, op, "Total Players in %s (%d) -- WIZ(%d) AFK(%d)",    new_draw_info_format(NDI_UNIQUE, 0, op, "Total Players in %s (%d) -- WIZ(%d) AFK(%d) BOT(%d)",
            reg->longname, num_players, num_wiz, num_afk);             reg->longname, num_players, num_wiz, num_afk, num_bot);
     }      }
     qsort (chars, num_players, sizeof(chars_names), (int (*)(const void *, const void *))name_cmp);      qsort (chars, num_players, sizeof(chars_names), (int (*)(const void *, const void *))name_cmp);
     for (i=0;i<num_players;i++)      for (i=0;i<num_players;i++)
Line 410
 
Line 413
  * h [Hostile] if character is hostile, nothing otherwise   * h [Hostile] if character is hostile, nothing otherwise
  * d [WIZ] if character is a dm, nothing otherwise   * d [WIZ] if character is a dm, nothing otherwise
  * a [AFK] if character is afk, nothing otherwise   * a [AFK] if character is afk, nothing otherwise
    * b [BOT] if character is a bot, nothing otherwise
  * l the level of the character   * l the level of the character
  * m the map path the character is currently on   * m the map path the character is currently on
  * M the map name of the map the character is currently on   * M the map name of the map the character is currently on
  * r the region name (eg scorn, wolfsburg)   * r the region name (eg scorn, wolfsburg)
  * R the regional title (eg The Kingdom of Scorn, The Port of Wolfsburg)   * R the regional title (eg The Kingdom of Scorn, The Port of Wolfsburg)
  * i player's ip adress   * i player's ip address
  * % a literal %   * % a literal %
  * _ a literal underscore   * _ a literal underscore
  */   */
Line 444
 
Line 448
    break;     break;
  case 'a' :    strcpy(return_val,(QUERY_FLAG(pl->ob,FLAG_AFK)?" [AFK]":""));   case 'a' :    strcpy(return_val,(QUERY_FLAG(pl->ob,FLAG_AFK)?" [AFK]":""));
    break;     break;
    case 'b' :    strcpy(return_val,(pl->socket.is_bot == 1)?" [BOT]":"");
      break;
  case 'm' :    strcpy(return_val,pl->ob->map->path);   case 'm' :    strcpy(return_val,pl->ob->map->path);
    break;     break;
  case 'M' :    strcpy(return_val,pl->ob->map->name?pl->ob->map->name:"Untitled");   case 'M' :    strcpy(return_val,pl->ob->map->name?pl->ob->map->name:"Untitled");


Legend:
line(s) removed in v.1.77 
line(s) changed
 line(s) added in v.1.78

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