//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: Implementation of CCVarList // // $Workfile: $ // $Date: $ // //------------------------------------------------------------------------------------------------------ // $Log: $ // // $NoKeywords: $ //=============================================================================// #include "cvars.h" //------------------------------------------------------------------------------------------------------ // Function: CCVarList::writeHTML // Purpose: generates and writes the report. generate() is not used in this object // because there is no real intermediate data. Really data is just taken from the // event list, massaged abit, and written out to the html file. There is no calculation // of stats or figures so no intermedidate data creation is needed. // Input: html - the html file that we want to write to. //------------------------------------------------------------------------------------------------------ void CCVarList::writeHTML(CHTMLFile& html) { CEventListIterator it; html.write("\n",HTML_TABLE_NUM_COLS); bool startOfRow=true; for (it=g_pMatchInfo->eventList()->begin(); it != g_pMatchInfo->eventList()->end(); ++it) { if ((*it)->getType()==CLogEvent::CVAR_ASSIGN) { char var[100]; char val[100]; if (!(*it)->getArgument(0) || !(*it)->getArgument(1)) return; (*it)->getArgument(0)->getStringValue(var); (*it)->getArgument(1)->getStringValue(val); //mask off any passwords that the server op may not want to be displayed if (stricmp(var,"rcon_password")==0 || stricmp(var,"sv_password")==0 || stricmp(var,"password")==0) { html.write("\n",var); continue; } if (startOfRow) { html.write("\n"); startOfRow=false; } else startOfRow=true; html.write("\t\n",var,val); } } html.write("
%s = %s
"); }