qboolean CheckSpawnNames (char *playerclass)
{
    int i;

    if(strlen(playerclass) == 0)
    {
        G_Printf("Usage: sv addbot <team> <class> <name>\n");
        return qfalse;
    }

    for (i=0; i<=numclasses; i++)
    {
        if(!Q_stricmp(playerclass, classinfo[i].name) == 0)
            continue;
    
        return qtrue;
    }

    G_Printf("Class %s not defined\n",playerclass);
    return qfalse;
}
int SetClassInfo (char *playerclass)
{
    int i;

    for (i=0; i<=numclasses; i++)
    {
        if(!Q_stricmp(playerclass, classinfo[i].name) == 0)
            continue;
    
        return i;
    }

    return 0;
}

void SetBotInfo(edict_t *fusionbot, char *playerclass)
{
    char    userinfo[MAX_INFO_STRING];
    char    bot_skin[MAX_INFO_STRING];
    char    bot_name[MAX_INFO_STRING];
    int i;


    for (i=0; i<=numclasses; i++)
    {
        if(!Q_stricmp(playerclass, classinfo[i].name) == 0)
            continue;
    
        sprintf(bot_skin,classinfo[i].skin1);
        fusionbot->r.client->pers.next_player_class = i;
//      if(strlen(name) == 0)
            sprintf(bot_name,"[BOT]%s-%d",classinfo[i].name,fusionbot->count);
//      else
//          strcpy(bot_name,name);
    }

    memset (userinfo, 0, sizeof(userinfo));

    Info_SetValueForKey (userinfo, "name", bot_name);

    Info_SetValueForKey (userinfo, "skin", bot_skin);

    Info_SetValueForKey (userinfo, "hand", "2");
}

qboolean CheckTeamNames (char *team)
{
    if(Q_stricmp(team, "red") == 0)
            return qtrue;
    if(Q_stricmp(team, "blue") == 0)
            return qtrue;

    G_Printf("Team %s not defined\n",team);
    return qfalse;
}