Skip to content

Commit

Permalink
Add current system time to jerry request
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed Jul 3, 2023
1 parent a88c1b9 commit d7dc0a2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ object MayorInfo {
if (mayor == null || nextSwitch <= System.currentTimeMillis()) return@launch
try {
val serverId = UUID.randomUUID().toString().replace("-".toRegex(), "")
val url =
"$baseURL/jerry/perks?username=${mc.session.username}&serverId=${serverId}&nextPerks=${nextSwitch}&mayor=${mayor.name}"
val commentForDecompilers =
"This sends a request to Mojang's auth server, used for verification. This is how we verify you are the real user without your session details. This is the exact same system Optifine uses."
mc.sessionService.joinServer(mc.session.profile, mc.session.token, serverId)
val url =
"$baseURL/jerry/perks?username=${mc.session.username}&serverId=${serverId}&nextPerks=${nextSwitch}&mayor=${mayor.name}&currTime=${System.currentTimeMillis()}"
println(client.get(url).bodyAsText())
} catch (e: AuthenticationException) {
e.printStackTrace()
Expand Down

0 comments on commit d7dc0a2

Please sign in to comment.