Sync with L2jServer HighFive Jul 25th 2015.
This commit is contained in:
@@ -42,7 +42,7 @@ import java.util.logging.Logger;
|
||||
import javax.crypto.Cipher;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.loginserver.GameServerTable.GameServerInfo;
|
||||
import com.l2jserver.loginserver.model.data.AccountInfo;
|
||||
import com.l2jserver.loginserver.network.L2LoginClient;
|
||||
@@ -218,7 +218,7 @@ public class LoginController
|
||||
byte[] raw = password.getBytes(StandardCharsets.UTF_8);
|
||||
String hashBase64 = Base64.getEncoder().encodeToString(md.digest(raw));
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(USER_INFO_SELECT))
|
||||
{
|
||||
ps.setString(1, Long.toString(System.currentTimeMillis()));
|
||||
@@ -253,7 +253,7 @@ public class LoginController
|
||||
return null;
|
||||
}
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(AUTOCREATE_ACCOUNTS_INSERT))
|
||||
{
|
||||
ps.setString(1, login);
|
||||
@@ -453,7 +453,7 @@ public class LoginController
|
||||
|
||||
if (loginOk && (client.getLastServer() != serverId))
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ACCOUNT_LAST_SERVER_UPDATE))
|
||||
{
|
||||
ps.setInt(1, serverId);
|
||||
@@ -472,7 +472,7 @@ public class LoginController
|
||||
|
||||
public void setAccountAccessLevel(String account, int banLevel)
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ACCOUNT_ACCESS_LEVEL_UPDATE))
|
||||
{
|
||||
ps.setInt(1, banLevel);
|
||||
@@ -487,7 +487,7 @@ public class LoginController
|
||||
|
||||
public void setAccountLastTracert(String account, String pcIp, String hop1, String hop2, String hop3, String hop4)
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ACCOUNT_IPS_UPDATE))
|
||||
{
|
||||
ps.setString(1, pcIp);
|
||||
@@ -547,7 +547,7 @@ public class LoginController
|
||||
{
|
||||
List<InetAddress> ipWhiteList = new ArrayList<>();
|
||||
List<InetAddress> ipBlackList = new ArrayList<>();
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ACCOUNT_IPAUTH_SELECT))
|
||||
{
|
||||
ps.setString(1, info.getLogin());
|
||||
@@ -593,7 +593,7 @@ public class LoginController
|
||||
|
||||
client.setAccessLevel(info.getAccessLevel());
|
||||
client.setLastServer(info.getLastServer());
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ACCOUNT_INFO_UPDATE))
|
||||
{
|
||||
ps.setLong(1, System.currentTimeMillis());
|
||||
|
Reference in New Issue
Block a user