Skip to content

Commit

Permalink
Fix mojangAuth not working after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Moresteck committed Sep 8, 2024
1 parent 45bc218 commit 1e0943c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/serverlist/BCPing.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import serverlist.AccessHelper.ServerType;

public class BCPing {
public static final String BCPING_VER = "2.1.1";
public static final String BCPING_VER = "2.1.2";
public static Logger log;

PingThread pingThread;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/serverlist/ServerlistAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public static void injectMojangAuthEarlyAlpha(Instrumentation inst) throws NotFo
CtMethod getSocketAddressMethod = optGetSocketAddressMethod.get();

NLHLoginMethod.insertBefore(
"if (!legacyfix.request.HasJoinedRequest.fire($1." + usernameField.getName() + ", $0." + networkManagerField.getName() + "." + getSocketAddressMethod.getName() + "().toString().split(\":\")[0])) {" +
"if (!util.request.HasJoinedRequest.fire($1." + usernameField.getName() + ", $0." + networkManagerField.getName() + "." + getSocketAddressMethod.getName() + "().toString().split(\":\")[0])) {" +
" $0." + NLHKickMethod.getName() + "(\"Login wasn't authenticated with Mojang!\");" +
" return null;" +
"}"
Expand Down Expand Up @@ -291,7 +291,7 @@ public static void injectMojangAuthClassic(Instrumentation inst) throws NotFound
}

handlePacketsMethod.insertBefore(
"if ($1 == $1." + packetIdentificationField + " && !legacyfix.request.HasJoinedRequest.fire(((String)$2[" + packetUsernameIndex + "]).trim(), $0." + networkManagerField + "." + ipField + ")) {" +
"if ($1 == $1." + packetIdentificationField + " && !util.request.HasJoinedRequest.fire(((String)$2[" + packetUsernameIndex + "]).trim(), $0." + networkManagerField + "." + ipField + ")) {" +
" $0." + kickMethod + "(\"Login wasn't authenticated with Mojang!\");" +
" return;" +
"}"
Expand Down

0 comments on commit 1e0943c

Please sign in to comment.