Fix few issues.
This commit is contained in:
parent
b97093a778
commit
2d07189e38
|
@ -101,7 +101,7 @@ public:
|
||||||
bool ReadINI_NewSection(const char *section, bool invalid_tokens, bool close_bracket, bool extra_tokens, unsigned int *curtok)
|
bool ReadINI_NewSection(const char *section, bool invalid_tokens, bool close_bracket, bool extra_tokens, unsigned int *curtok)
|
||||||
{
|
{
|
||||||
if (new_section != -1)
|
if (new_section != -1)
|
||||||
return executeForwards(new_section, handle, section, invalid_tokens, close_bracket, extra_tokens, *curtok) > 0 ? false : true;
|
return executeForwards(new_section, handle, section, invalid_tokens, close_bracket, extra_tokens, *curtok) > 0 ? true : false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ public:
|
||||||
bool ReadINI_KeyValue(const char *key, const char *value, bool invalid_tokens, bool equal_token, bool quotes, unsigned int *curtok)
|
bool ReadINI_KeyValue(const char *key, const char *value, bool invalid_tokens, bool equal_token, bool quotes, unsigned int *curtok)
|
||||||
{
|
{
|
||||||
if (key_value != -1)
|
if (key_value != -1)
|
||||||
return executeForwards(key_value, handle, key, value, invalid_tokens, equal_token, quotes, *curtok) > 0 ? false : true;
|
return executeForwards(key_value, handle, key, value, invalid_tokens, equal_token, quotes, *curtok) > 0 ? true : false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ public:
|
||||||
bool ReadINI_RawLine(const char *line, unsigned int *curtok)
|
bool ReadINI_RawLine(const char *line, unsigned int *curtok)
|
||||||
{
|
{
|
||||||
if (raw_line != -1)
|
if (raw_line != -1)
|
||||||
return executeForwards(raw_line, handle, line, *curtok) > 0 ? false : true;
|
return executeForwards(raw_line, handle, line, *curtok) > 0 ? true : false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,33 +212,38 @@ public ReadCSDM_NewSection(INIParser:handle, const section[], bool:invalid_token
|
||||||
if ((equal(section, "secondary") && !extra_tokens) ||
|
if ((equal(section, "secondary") && !extra_tokens) ||
|
||||||
(equal(section, "botsecondary") && close_bracket))
|
(equal(section, "botsecondary") && close_bracket))
|
||||||
{
|
{
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
++SuccessCount;
|
++SuccessCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadCSDM_KeyValue(INIParser:handle, const key[], const value[], bool:invalid_tokens, bool:equal_token, bool:quotes, curtok)
|
public bool:ReadCSDM_KeyValue(INIParser:handle, const key[], const value[], bool:invalid_tokens, bool:equal_token, bool:quotes, curtok)
|
||||||
{
|
{
|
||||||
Debug && server_print("^t^tReadCSDM_KeyValue - %-32s %s", key, value);
|
Debug && server_print("^t^tReadCSDM_KeyValue - %-32s %s", key, value);
|
||||||
|
|
||||||
new buffer[128];
|
new buffer[128];
|
||||||
if (TrieGetString(ExpectedKVData, key, buffer, charsmax(buffer)) && equal(value, buffer))
|
if (TrieGetString(ExpectedKVData, key, buffer, charsmax(buffer)) && equal(value, buffer))
|
||||||
{
|
{
|
||||||
if (equal(value, "colors") && !quotes)
|
if (equal(key, "colors") && !quotes)
|
||||||
{
|
{
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
++SuccessCount;
|
++SuccessCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadCSDM_CurrentLine(INIParser:handle, const line[], curtok)
|
public bool:ReadCSDM_CurrentLine(INIParser:handle, const line[], curtok)
|
||||||
{
|
{
|
||||||
//Debug && server_print("^t^tReadCSDM_CurrentLine - %s", line);
|
//Debug && server_print("^t^tReadCSDM_CurrentLine - %s", line);
|
||||||
++SuccessCount;
|
++SuccessCount;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadCSDM_ParseEnd(INIParser:handle, bool:halted, bool:failed)
|
public ReadCSDM_ParseEnd(INIParser:handle, bool:halted, bool:failed)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user