/**
* Get addons/sourcemod/configs/core.cfg "PassInfoVar" value.
*
* @param value Buffer to store the value.
* @param maxlength Maximum length of string buffer.
*
* @return True on success, false otherwise.
*/
#include <regex>
stock bool:GetPassInfoVar(String:value[], maxlength)
{
new Handle:file = OpenFile("addons/sourcemod/configs/core.cfg", "rb");
if (file == INVALID_HANDLE)
{
return false;
}
static Handle:re;
if (re == INVALID_HANDLE)
{
re = CompileRegex("\\s+\"PassInfoVar\"\\s+\"(\\w+)\"");
}