Skip to content

Commit

Permalink
Merge pull request #249 from LossyDragon/machine-name
Browse files Browse the repository at this point in the history
Add machine name field to logon
  • Loading branch information
LossyDragon authored Nov 13, 2023
2 parents bade894 + bcfcea6 commit e84dc50
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,20 @@ public class LogOnDetails {

private String clientLanguage;

private String machineName;

public LogOnDetails() {
accountInstance = SteamID.DESKTOP_INSTANCE;
accountID = 0L;

clientOSType = Utils.getOSType();
clientLanguage = "english";

String envName = System.getenv("COMPUTERNAME");
if (envName == null) {
envName = System.getenv("HOSTNAME");
}
machineName = envName + " (JavaSteam)";
}

/**
Expand Down Expand Up @@ -344,4 +352,22 @@ public String getClientLanguage() {
public void setClientLanguage(String clientLanguage) {
this.clientLanguage = clientLanguage;
}

/**
* Gets the machine name
*
* @return the machine name
*/
public String getMachineName() {
return machineName;
}

/**
* Sets the machine name
*
* @param machineName the machine name
*/
public void setMachineName(String machineName) {
this.machineName = machineName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public void logOn(LogOnDetails details) {
// we're now using the latest steamclient package version, this is required to get a proper sentry file for steam guard
logon.getBody().setClientPackageVersion(1771); // todo: determine if this is still required
logon.getBody().setSupportsRateLimitResponse(true);
logon.getBody().setMachineName(details.getMachineName());
logon.getBody().setMachineId(ByteString.copyFrom(HardwareUtils.getMachineID()));

// steam guard
Expand Down

0 comments on commit e84dc50

Please sign in to comment.