Fix PlayerAuth constructor calls

This commit is contained in:
games647
2015-10-03 18:22:13 +02:00
parent 4c2348e6e3
commit e9f299fca8
16 changed files with 1115 additions and 1128 deletions
@@ -49,10 +49,10 @@ public class CrazyLoginConverter implements Converter {
continue;
if (args[0].equalsIgnoreCase("name"))
continue;
String player = args[0].toLowerCase();
String playerName = args[0].toLowerCase();
String psw = args[1];
if (psw != null) {
PlayerAuth auth = new PlayerAuth(player, psw, "127.0.0.1", System.currentTimeMillis(), player);
PlayerAuth auth = new PlayerAuth(playerName, psw, "127.0.0.1", System.currentTimeMillis(), playerName);
database.saveAuth(auth);
}
}
@@ -74,17 +74,17 @@ public class RakamakConverter implements Converter {
}
users.close();
for (Entry<String, String> m : playerPSW.entrySet()) {
String player = m.getKey();
String psw = playerPSW.get(player);
String playerName = m.getKey();
String psw = playerPSW.get(playerName);
String ip;
if (useIP) {
ip = playerIP.get(player);
ip = playerIP.get(playerName);
} else {
ip = "127.0.0.1";
}
PlayerAuth auth = new PlayerAuth(player, psw, ip, System.currentTimeMillis(), player);
if (PasswordSecurity.userSalt.containsKey(player))
auth.setSalt(PasswordSecurity.userSalt.get(player));
PlayerAuth auth = new PlayerAuth(playerName, psw, ip, System.currentTimeMillis(), playerName);
if (PasswordSecurity.userSalt.containsKey(playerName))
auth.setSalt(PasswordSecurity.userSalt.get(playerName));
database.saveAuth(auth);
}
ConsoleLogger.info("Rakamak database has been imported correctly");
@@ -30,7 +30,7 @@ public class RoyalAuthConverter implements Converter {
if (!file.exists())
continue;
RoyalAuthYamlReader ra = new RoyalAuthYamlReader(file);
PlayerAuth auth = new PlayerAuth(name, ra.getHash(), "127.0.0.1", ra.getLastLogin(), "your@email.com");
PlayerAuth auth = new PlayerAuth(name, ra.getHash(), "127.0.0.1", ra.getLastLogin(), "your@email.com", o.getName());
data.saveAuth(auth);
} catch (Exception e) {
ConsoleLogger.writeStackTrace(e);
@@ -44,9 +44,9 @@ public class vAuthFileReader {
}
if (pname == null)
continue;
auth = new PlayerAuth(pname.toLowerCase(), password, "127.0.0.1", System.currentTimeMillis(), "your@email.com");
auth = new PlayerAuth(pname.toLowerCase(), password, "127.0.0.1", System.currentTimeMillis(), "your@email.com", pname);
} else {
auth = new PlayerAuth(name.toLowerCase(), password, "127.0.0.1", System.currentTimeMillis(), "your@email.com");
auth = new PlayerAuth(name.toLowerCase(), password, "127.0.0.1", System.currentTimeMillis(), "your@email.com", name);
}
database.saveAuth(auth);
}
@@ -47,7 +47,7 @@ public class xAuthToFlat {
String pl = getIdPlayer(id);
String psw = getPassword(id);
if (psw != null && !psw.isEmpty() && pl != null) {
PlayerAuth auth = new PlayerAuth(pl, psw, "192.168.0.1", 0, "your@email.com");
PlayerAuth auth = new PlayerAuth(pl, psw, "192.168.0.1", 0, "your@email.com", pl);
database.saveAuth(auth);
}
}