Log out everyone on startup
This commit is contained in:
@@ -731,7 +731,7 @@ public class Server {
|
||||
|
||||
final int worldCount = Math.min(GameConstants.WORLD_NAMES.length, YamlConfig.config.server.WORLDS);
|
||||
try (Connection con = DatabaseConnection.getConnection()) {
|
||||
setAllLoggedOut(con);
|
||||
channelDependencies.accountService().setAllLoggedOut();
|
||||
setAllMerchantsInactive(con);
|
||||
cleanNxcodeCoupons(con);
|
||||
loadCouponRates(con);
|
||||
@@ -873,12 +873,6 @@ public class Server {
|
||||
return loginServer;
|
||||
}
|
||||
|
||||
private static void setAllLoggedOut(Connection con) throws SQLException {
|
||||
try (PreparedStatement ps = con.prepareStatement("UPDATE accounts SET loggedin = 0")) {
|
||||
ps.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
private static void setAllMerchantsInactive(Connection con) throws SQLException {
|
||||
try (PreparedStatement ps = con.prepareStatement("UPDATE characters SET HasMerchant = 0")) {
|
||||
ps.executeUpdate();
|
||||
|
||||
Reference in New Issue
Block a user