mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-14 00:02:07 -04:00
Changed login handler to set client's accessLevel
This commit is contained in:
@@ -151,6 +151,8 @@ public class LoginService implements INetworkDispatch{
|
||||
client.setSessionKey(generateSessionKey());
|
||||
client.setAccountId(id);
|
||||
client.setSession(session);
|
||||
String accessLevel = core.adminService.getAccessLevelFromDB(id);
|
||||
if (accessLevel != null && !accessLevel.equals("")) { client.setAccessLevel(accessLevel); }
|
||||
|
||||
core.addClient(session, client);
|
||||
|
||||
|
||||
@@ -689,7 +689,7 @@ public class CommandService implements INetworkDispatch {
|
||||
public void processCommand(CreatureObject actor, SWGObject target, BaseSWGCommand command, int actionCounter, String commandArgs) {
|
||||
|
||||
if (command.getGodLevel() > 0 || command.getCommandName().equals("setgodmode")) {
|
||||
String accessLevel = core.adminService.getAccessLevelFromDB(actor.getClient().getAccountId());
|
||||
String accessLevel = actor.getClient().getAccessLevel();
|
||||
String filePath = "accesslevels/" + accessLevel + ".txt";
|
||||
|
||||
if(FileUtilities.doesFileExist(filePath)) {
|
||||
|
||||
Reference in New Issue
Block a user