int UTIL_GetServerPort()
{
static ConVar hostport = null;
if (hostport == null)
{
hostport = FindConVar("hostport");
}
return hostport.IntValue;
}
void UTIL_GetServerAddress(char[] szBuffer, int iBufferSize)
{
static ConVar hostip = null;
if (hostip == null)
{
hostip = FindConVar("hostip");
}
int iIp = hostip.IntValue;
FormatEx(
szBuffer, iBufferSize, "%d.%d.%d.%d",
(iIp >> 24) & 0xFF,
(iIp >> 16) & 0xFF,
(iIp >> 8 ) & 0xFF,
(iIp ) & 0xFF
);
}