Exemplo n.º 1
0
string CUIApp::CTFStatsExec::getExecString()
{
	string retval("\"");
	retval+=addSlash(TFStatsdirectory);
	retval+="TFStatsRT.exe\"  \"" ;
	retval+=fullpath;
	retval+="\" outputDir=\"";
	retval+=addSlash(outputdirectory);
	retval+=removeSlash(outputsubdir);
	retval+="\" ";
	
	retval+="ruleDir=\"";
	retval+=removeSlash(ruledirectory);
	retval+="\" ";

	retval+=" useSupportDir=";
	retval+=useSupportDir?"yes":"no";
	if (useSupportDir)
	{
		retval+=" supportDir=\"";
		retval+=removeSlash(supportdirectory);
		retval+="\" supportHTTPPath=\"";
		retval+=removeSlash(supporthttp);
		retval+="\"";
	}
	retval+=" persistPlayerStats=";
	retval+=persistPlayerStats?"yes":"no";
	if (persistPlayerStats)
	{
		retval+=" playerDir=\"";
		retval+=removeSlash(playerdirectory);
		retval+="\" ";
		retval+=" playerHTTPPath=\"";
		retval+=removeSlash(playerhttp);
		retval+="\"";
	}
	
	retval+=" eliminateOldPlayers=";
	retval+=elimOldPlayers?"yes":"no";
	if (elimOldPlayers)
	{
		retval+=" oldPlayerCutoff=";
		char buf[100];
		itoa(elimDays,buf,10);
		retval+=buf;
		retval+=" ";
	}


	
	retval+=" displayMM2=";
	retval+=displayMM2?"yes":"no";
	retval+=" displayStartUpInfo=";
	retval+=displayStartupInfo?"yes":"no";
	

	return retval;
}
Exemplo n.º 2
0
Date Date::setDateWithSlashesToObject(string dateWithSlashes, Date currentDate)
{
	int day=0, month=0, year=0;
	vector<string> dateWithoutSlash= removeSlash(dateWithSlashes);
	day = atoi(dateWithoutSlash[0].c_str());
	month = atoi(dateWithoutSlash[1].c_str());

	if(dateWithoutSlash.size()==2)
	{
		year = this->getYear();
		Date tempDate=setDateObject(day, month, year);
		if(tempDate.compareDates(currentDate) >0)
			year+=1;
	}
		
	
	else if(dateWithoutSlash.size()==3)
		year= atoi(dateWithoutSlash[2].c_str());
	
	Date newDate=setDateObject(day,month,year);
	return newDate;
}