From 0f0254ead4ba739a7335cc5ff0cf50ff74ed0302 Mon Sep 17 00:00:00 2001 From: Deatho0ne <63743555+Deatho0ne@users.noreply.github.com> Date: Thu, 2 Jun 2022 23:44:12 -0400 Subject: [PATCH] ServerCall - Update To try to prevent some bans, mostly for a high number of BS contracts. Have also heard it bans from chest buying/opening also, but have not seen that personally. Tested 5.2k Tiny BS and 60k Tiny BS (which was roughly the count that banned me twice). --- IdleCombos.ahk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/IdleCombos.ahk b/IdleCombos.ahk index 3e76af7..9359bfe 100644 --- a/IdleCombos.ahk +++ b/IdleCombos.ahk @@ -2129,15 +2129,19 @@ Lg_Blacksmith: } ServerCall(callname, parameters) { - URLtoCall := "http://ps7.idlechampions.com/~idledragons/post.php?call=" callname parameters + ;servername from settings, instead of the hard coded value + URLtoCall := "http://" servername ".idlechampions.com/~idledragons/post.php?call=" callname parameters WR := ComObjCreate("WinHttp.WinHttpRequest.5.1") - WR.SetTimeouts("10000", "10000", "10000", "10000") + ;default values on the below in ms, 0 is INF + ;from https://docs.microsoft.com/en-us/windows/win32/winhttp/iwinhttprequest-settimeouts + WR.SetTimeouts(0, 60000, 30000, 120000) Try { WR.Open("POST", URLtoCall, false) WR.SetRequestHeader("Content-Type","application/x-www-form-urlencoded") WR.Send() - WR.WaitForResponse(-1) + WR.WaitForResponse() data := WR.ResponseText + WR.Close() } UpdateLogTime() FileAppend, (%CurrentTime%) Server request: "%callname%"`n, %OutputLogFile% @@ -2876,4 +2880,4 @@ while (clipContents ~= regexpPattern) { } foundCodeString := RegExReplace(foundCodeString, "`r`n$") return foundCodeString -} \ No newline at end of file +}