Skip to content

Commit

Permalink
Added private email domain support (username@domain.com) + Small bug …
Browse files Browse the repository at this point in the history
…fixes

PokeAlert output format will now output password correctly
  • Loading branch information
parislarkins committed Feb 9, 2017
1 parent 995cf5f commit b1b7415
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/pallettown/AccountCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,12 @@ else if (PalletTown.count >= 1 && PalletTown.startNum != null)
accPw = password;
}

String accMail = plusMail.replace("@","+" + accUser + "@");
String accMail;

if(!PalletTown.privateDomain)
accMail = plusMail.replace("@","+" + accUser + "@");
else
accMail = plusMail.replace("@",accUser + "@");

Log(" Username: " + accUser);
Log(" Password: " + accPw);
Expand All @@ -295,7 +300,7 @@ else if (PalletTown.count >= 1 && PalletTown.startNum != null)
PalletTown.outputAppend("ptc," + accUser+","+accPw);
break;
case PokeAlert:
PalletTown.outputAppend(accUser + " " + password + " PTC None");
PalletTown.outputAppend(accUser + " " + accPw + " PTC None");
break;
case Standard:
PalletTown.outputAppend(accUser+","+accPw);
Expand Down
4 changes: 4 additions & 0 deletions src/pallettown/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,10 @@ private void makeAdvancedControls() {
debugBox.setSelected(debug);
vb.getChildren().add(debugBox);

CheckBox usePrivateDomain = new CheckBox("Use private email domain (username@domain.com)");
usePrivateDomain.setSelected(privateDomain);
vb.getChildren().addAll(usePrivateDomain);

TextArea textArea = new TextArea();
textArea.setEditable(false);
textArea.setPrefHeight(500);
Expand Down
11 changes: 10 additions & 1 deletion src/pallettown/PalletTown.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
public class PalletTown implements Runnable {

public static final double VERSION = 1.45;
public static final double VERSION = 1.5;

public static String plusMail;
public static String userName;
Expand All @@ -38,6 +38,7 @@ public class PalletTown implements Runnable {
public static int resetTime = 960000;
public static OutputFormat outputFormat = OutputFormat.RocketMap;
public static boolean useNullProxy = true;
public static boolean privateDomain = false;
private static final File settingsFile = new File("pallettown.config");

public static boolean changedProxies = true;
Expand Down Expand Up @@ -249,6 +250,9 @@ private static void parseArgs() {

CheckBox debugMode = (CheckBox) advancedVb.getChildren().get(5);
debug = debugMode.isSelected();

CheckBox usePrivateDomain = (CheckBox) advancedVb.getChildren().get(6);
privateDomain = usePrivateDomain.isSelected();
}

public static void loadSettings(){
Expand Down Expand Up @@ -330,6 +334,9 @@ public static void loadSettings(){
case "useNullProxy":
useNullProxy = Boolean.parseBoolean(value);
break;
case "privateDomain":
privateDomain = Boolean.parseBoolean(value);
break;
}

}
Expand Down Expand Up @@ -390,6 +397,8 @@ private static void saveSettings(){
bw.newLine();
bw.write("useNullProxy:"+useNullProxy);
bw.newLine();
bw.write("privateDomain:"+privateDomain);
bw.newLine();
bw.flush();
bw.close();
} catch (IOException e) {
Expand Down

0 comments on commit b1b7415

Please sign in to comment.