mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
added Vote comments starting with # and also made announcement comments start with #
This commit is contained in:
parent
ed7a1d5bcd
commit
881fd901a6
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue