From c2587a10f2cedaf98445307db268efc08d1a8012 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Thu, 27 Oct 2016 19:40:53 -0700 Subject: [PATCH] Fixes bug not storing token in low latency connections --- code/modules/client/client_procs.dm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 33255a30190..b982cb2ec83 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -349,8 +349,10 @@ var/next_external_rsc = 0 if (!cidcheck_spoofckeys[ckey]) message_admins("[key_name(src)] appears to have attempted to spoof a cid randomizer check.") cidcheck_spoofckeys[ckey] = 1 - tokens[ckey] = cid_check_reconnect() cidcheck[ckey] = computer_id + tokens[ckey] = cid_check_reconnect() + + sleep(10) //browse is queued, we don't want them to disconnect before getting the browse() command. qdel(src) return TRUE @@ -367,7 +369,7 @@ var/next_external_rsc = 0 note_randomizer_user() log_access("Failed Login: [key] [computer_id] [address] - CID randomizer confirmed (oldcid: [oldcid])") - + qdel(src) return TRUE else @@ -389,8 +391,10 @@ var/next_external_rsc = 0 lastcid = query_cidcheck.item[1] if (computer_id != lastcid) - tokens[ckey] = cid_check_reconnect() cidcheck[ckey] = computer_id + tokens[ckey] = cid_check_reconnect() + + sleep(10) //browse is queued, we don't want them to disconnect before getting the browse() command. qdel(src) return TRUE @@ -400,10 +404,8 @@ var/next_external_rsc = 0 log_access("Failed Login: [key] [computer_id] [address] - CID randomizer check") var/url = winget(src, null, "url") //special javascript to make them reconnect under a new window. - - src << browse("byond://[url]", "border=0;titlebar=0;size=1x1") - sleep(10) //browse is queued, we don't want them to disconnect before getting the browse() command. - src << "You will be automatically taken to the game, if not, click here to be taken manually" + src << browse("byond://[url]?token=[token]", "border=0;titlebar=0;size=1x1") + src << "You will be automatically taken to the game, if not, click here to be taken manually" /client/proc/note_randomizer_user() var/const/adminckey = "CID-Error"