Refactor Status plugin and reduce sendbuffer

This commit is contained in:
BotoX
2016-12-19 08:33:35 +01:00
parent ea25eb9aee
commit bb5e3aa572
2 changed files with 47 additions and 32 deletions
+6 -7
View File
@@ -17,34 +17,33 @@ stock float GetServerFPS()
stock Handle GetServerFPSConf()
{
static Handle hGameConf = null;
if (hGameConf == null)
{
hGameConf = LoadGameConfigFile("serverfps.games");
if (hGameConf == null)
{
SetFailState("Couldn't find \"serverfps.games\" configuration file");
}
}
return hGameConf;
}
stock Address GetHostTimeFrame()
{
static Address pHostTimeFrame = Address_Null;
if (pHostTimeFrame == Address_Null)
{
pHostTimeFrame = GameConfGetAddress(GetServerFPSConf(), "HostTimeFrame");
if (pHostTimeFrame == Address_Null)
{
SetFailState("Failed to find time frame address");
}
}
return pHostTimeFrame;
}