Adding proper credits system
Added a script for visually improving credit view. Tracked back the server sources before with respective owners. It possibly still needs to be updated.
This commit is contained in:
@@ -532,7 +532,7 @@ public class MapleClient {
|
||||
if (getLoginState() > LOGIN_NOTLOGGEDIN) { // already loggedin
|
||||
loggedIn = false;
|
||||
loginok = 7;
|
||||
} else if (pwd.charAt(0) == '$' && pwd.charAt(1) == '2' && BCrypt.checkpw(pwd, passhash)) {
|
||||
} else if (passhash.charAt(0) == '$' && passhash.charAt(1) == '2' && BCrypt.checkpw(pwd, passhash)) {
|
||||
loginok = (tos == 0) ? 23 : 0;
|
||||
} else if (pwd.equals(passhash) || checkHash(passhash, "SHA-1", pwd) || checkHash(passhash, "SHA-512", pwd + salt)) {
|
||||
loginok = (tos == 0) ? -23 : -10; // migrate to bcrypt
|
||||
|
||||
@@ -355,21 +355,10 @@ public class Commands {
|
||||
dateFormat.setTimeZone(TimeZone.getTimeZone(ServerConstants.TIMEZONE));
|
||||
player.yellowMessage("Solaxia Server Time: " + dateFormat.format(new Date()));
|
||||
break;
|
||||
|
||||
|
||||
case "credits":
|
||||
case "staff":
|
||||
player.yellowMessage("HeavenMS (MapleSolaxiaV2) Staff");
|
||||
player.yellowMessage("Ronan - Developer");
|
||||
player.yellowMessage("Vcoc - Freelance Developer");
|
||||
player.yellowMessage("");
|
||||
player.yellowMessage("MapleSolaxia Staff");
|
||||
player.yellowMessage("Aria - Administrator");
|
||||
player.yellowMessage("Twdtwd - Administrator");
|
||||
player.yellowMessage("Exorcist - Developer");
|
||||
player.yellowMessage("SharpAceX - Developer");
|
||||
player.yellowMessage("Zygon - Freelance Developer");
|
||||
player.yellowMessage("SourMjolk - Game Master");
|
||||
player.yellowMessage("Kanade - Game Master");
|
||||
player.yellowMessage("Kitsune - Game Master");
|
||||
c.getAbstractPlayerInteraction().openNpc(2010007, "credits");
|
||||
break;
|
||||
|
||||
case "lastrestart":
|
||||
|
||||
@@ -48,7 +48,6 @@ public final class LoginPasswordHandler implements MaplePacketHandler {
|
||||
|
||||
String login = slea.readMapleAsciiString();
|
||||
String pwd = slea.readMapleAsciiString();
|
||||
String bcryptedpass = BCrypt.hashpw(pwd, BCrypt.gensalt(12));
|
||||
c.setAccountName(login);
|
||||
|
||||
int loginok = c.login(login, pwd);
|
||||
@@ -61,7 +60,7 @@ public final class LoginPasswordHandler implements MaplePacketHandler {
|
||||
con = DatabaseConnection.getConnection();
|
||||
ps = con.prepareStatement("INSERT INTO accounts (name, password) VALUES (?, ?);");
|
||||
ps.setString(1, login);
|
||||
ps.setString(2, bcryptedpass);
|
||||
ps.setString(2, BCrypt.hashpw(pwd, BCrypt.gensalt(12)));
|
||||
ps.executeUpdate();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
@@ -75,7 +74,7 @@ public final class LoginPasswordHandler implements MaplePacketHandler {
|
||||
try {
|
||||
con = DatabaseConnection.getConnection();
|
||||
ps = con.prepareStatement("UPDATE accounts SET password = ? WHERE name = ?;");
|
||||
ps.setString(1, bcryptedpass);
|
||||
ps.setString(1, BCrypt.hashpw(pwd, BCrypt.gensalt(12)));
|
||||
ps.setString(2, login);
|
||||
ps.executeUpdate();
|
||||
} catch (SQLException e) {
|
||||
|
||||
Reference in New Issue
Block a user