Rename AccountService methods

This commit is contained in:
P0nk
2024-09-29 09:14:32 +02:00
parent da4a467453
commit a580e44bc9
8 changed files with 14 additions and 10 deletions

View File

@@ -213,7 +213,7 @@ public class AccountService {
return accountRepository.setChrSlots(accountId, chrSlots);
}
public boolean logIn(Client c) {
public boolean setLoggedIn(Client c) {
byte newState = LoginState.LOGGED_IN;
int currentState = c.getLoginState();
if (currentState != LoginState.NOT_LOGGED_IN && currentState != LoginState.SERVER_TRANSITION) {
@@ -224,8 +224,12 @@ public class AccountService {
return true;
}
public void logOut(Client c) {
public void setLoggedOutAndDisconnect(Client c) {
SessionCoordinator.getInstance().closeSession(c, false);
setLoggedOut(c);
}
public void setLoggedOut(Client c) {
setLoginState(c, LoginState.NOT_LOGGED_IN);
}