From cec70b3b64ae00d39f6dd8c3faedf0ad5f7d7ab1 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 15 Jan 2023 10:55:16 -0500 Subject: [PATCH] Tweak of column names and Event Strings. --- src/engine/db/handlers/dbAccountHandler.java | 2 +- src/engine/gameManager/DevCmdManager.java | 2 +- .../net/client/handlers/LoginToGameServerMsgHandler.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engine/db/handlers/dbAccountHandler.java b/src/engine/db/handlers/dbAccountHandler.java index 35ed3533..cab89c03 100644 --- a/src/engine/db/handlers/dbAccountHandler.java +++ b/src/engine/db/handlers/dbAccountHandler.java @@ -49,7 +49,7 @@ public class dbAccountHandler extends dbHandlerBase { public void WRITE_ADMIN_LOG(String adminName, String logEntry) { - prepareCallable("INSERT INTO dyn_admin_log(`DateTime`, `Account`, `Event`)" + prepareCallable("INSERT INTO dyn_admin_log(`dateTime`, `charName`, `eventString`)" + " VALUES (?, ?, ?)"); setTimeStamp(1, System.currentTimeMillis()); setString(2, adminName); diff --git a/src/engine/gameManager/DevCmdManager.java b/src/engine/gameManager/DevCmdManager.java index e1883650..e74cf12f 100644 --- a/src/engine/gameManager/DevCmdManager.java +++ b/src/engine/gameManager/DevCmdManager.java @@ -204,7 +204,7 @@ public enum DevCmdManager { + ") '"; logString += cmd + ' ' + argString + '\''; Logger.info( logString); - DbManager.AccountQueries.WRITE_ADMIN_LOG(pcName, cmd + " " + argString); + DbManager.AccountQueries.WRITE_ADMIN_LOG(pcName, "COMMAND: " + cmd + " " + argString); // execute command; try { diff --git a/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java b/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java index 57d647a2..70fe7662 100644 --- a/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java +++ b/src/engine/net/client/handlers/LoginToGameServerMsgHandler.java @@ -115,7 +115,8 @@ public class LoginToGameServerMsgHandler extends AbstractClientMsgHandler { // Log Admin Login Event if (pc.getAccount().status.equals(Enum.AccountStatus.ADMIN)) - DbManager.AccountQueries.WRITE_ADMIN_LOG(pc.getCombinedName(), "ADMIN LOGIN EVENT"); + DbManager.AccountQueries.WRITE_ADMIN_LOG(pc.getCombinedName(), "ADMIN LOGIN"); + DbManager.AccountQueries.SET_ACCOUNT_LOGIN(sessionInfo.getAccount(), sessionInfo.getPlayerCharacter().getName(), origin.getClientIpAddress(), sessionInfo.getMachineID()); return true; }