Fix cookie handle errors (#333)

This commit is contained in:
shavitush 2017-06-03 21:33:02 +03:00
parent 95ed069c6b
commit 63c8fc2a79

View File

@ -963,11 +963,21 @@ public void OnClientCookiesCached(int client)
}
char[] sCookie = new char[4];
GetClientCookie(client, gH_AutoBhopCookie, sCookie, 4);
if(gH_AutoBhopCookie != null)
{
GetClientCookie(client, gH_AutoBhopCookie, sCookie, 4);
}
gB_Auto[client] = (strlen(sCookie) > 0)? view_as<bool>(StringToInt(sCookie)):true;
GetClientCookie(client, gH_StyleCookie, sCookie, 4);
gBS_Style[client] = view_as<BhopStyle>(StringToInt(sCookie));
if(gH_StyleCookie != null)
{
GetClientCookie(client, gH_StyleCookie, sCookie, 4);
}
gBS_Style[client] = view_as<BhopStyle>((strlen(sCookie) > 0)? StringToInt(sCookie):0);
UpdateAutoBhop(client);
}