Don't update IP twice
- IP is updated in datasource#updateSession after successful login - Remove no longer used DataSource#updateIp
This commit is contained in:
@@ -555,20 +555,6 @@ public class SQLite implements DataSource {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateIp(String user, String ip) {
|
||||
String sql = "UPDATE " + tableName + " SET " + col.IP + "=? WHERE " + col.NAME + "=?;";
|
||||
try (PreparedStatement pst = con.prepareStatement(sql)) {
|
||||
pst.setString(1, ip);
|
||||
pst.setString(2, user);
|
||||
pst.executeUpdate();
|
||||
return true;
|
||||
} catch (SQLException ex) {
|
||||
logSqlException(ex);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayerAuth> getAllAuths() {
|
||||
List<PlayerAuth> auths = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user