From 94740c6252c025eede6091da7413f813692ac1d1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 8 Jan 2023 13:48:44 +0000 Subject: Switch sqloper to use a local user lookup instead of IS_LOCAL. --- src/modules/m_sqloper.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/modules/m_sqloper.cpp') diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index 130397a09..20bf8596f 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -119,11 +119,9 @@ public: // Call /oper after placing all blocks from the SQL table into the Config->OperAccounts list. void OperExec() { - auto user = ServerInstance->Users.Find(uid); - LocalUser* localuser = IS_LOCAL(user); - // This should never be true - if (!localuser) - return; + auto user = ServerInstance->Users.Find(uid); + if (!user) + return; // The user disconnected before the SQL query returned. Command* oper_command = ServerInstance->Parser.GetHandler("OPER"); @@ -137,7 +135,7 @@ public: ModResult MOD_RESULT; std::string origin = "OPER"; - FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (origin, params, localuser, true)); + FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (origin, params, user, true)); if (MOD_RESULT == MOD_RES_DENY) return; -- cgit v1.3.1-10-gc9f91