added Vote comments starting with # and also made announcement comments start with #

This commit is contained in:
GreYFoXGTi 2010-12-06 00:38:29 +02:00
parent ed7a1d5bcd
commit 881fd901a6
3 changed files with 3 additions and 3 deletions

View file

@ -1,2 +1,2 @@
Please Visit DDRace.info to report any bugs Thanks
//This File must always have a line break at the end of file
#This File must always have a line break at the end of file

View file

@ -1828,7 +1828,7 @@ char *CServer::GetLine(char const *FileName, int Line)
lr->Init(File);
while(pLine = lr->Get())
if(str_length(pLine))
if(pLine[0]!='/' || pLine[1]!='/')
if(pLine[0]!='#')
v.push_back(pLine);
if(Line >= v.size())
Line %= v.size();

View file

@ -1236,7 +1236,7 @@ void CGameContext::ConAddVote(IConsole::IResult *pResult, void *pUserData, int C
const char *pString = pResult->GetString(0);
// check for valid option
if(!pSelf->Console()->LineIsValid(pResult->GetString(0)))
if(!pSelf->Console()->LineIsValid(pResult->GetString(0)) && pResult->GetString(0) != '#')
{
char aBuf[256];
str_format(aBuf, sizeof(aBuf), "skipped invalid option '%s'", pResult->GetString(0));