From 21ff024bf82ae9a4e83d098d26276d324eb48992 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 15 Jan 2023 10:34:56 -0500 Subject: [PATCH] Admin login events captured. --- .../net/client/handlers/LoginToGameServerMsgHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java b/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java index 175dccc4..57d647a2 100644 --- a/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java +++ b/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java @@ -112,6 +112,10 @@ public class LoginToGameServerMsgHandler extends AbstractClientMsgHandler { Logger.info("Login from Account: " + sessionInfo.getAccount().getUname() + " Character: " + sessionInfo.getPlayerCharacter().getName() + " machineID: " + sessionInfo.getMachineID()); + // Log Admin Login Event + + if (pc.getAccount().status.equals(Enum.AccountStatus.ADMIN)) + DbManager.AccountQueries.WRITE_ADMIN_LOG(pc.getCombinedName(), "ADMIN LOGIN EVENT"); DbManager.AccountQueries.SET_ACCOUNT_LOGIN(sessionInfo.getAccount(), sessionInfo.getPlayerCharacter().getName(), origin.getClientIpAddress(), sessionInfo.getMachineID()); return true; }