diff options
| author | 2023-01-08 13:48:44 +0000 | |
|---|---|---|
| committer | 2023-01-08 13:48:44 +0000 | |
| commit | 94740c6252c025eede6091da7413f813692ac1d1 (patch) | |
| tree | 9dcae31976b2f795915f0e2a0d89d0f152c328bd /src/modules/m_sqloper.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Switch sqloper to use a local user lookup instead of IS_LOCAL.
Diffstat (limited to 'src/modules/m_sqloper.cpp')
| -rw-r--r-- | src/modules/m_sqloper.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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<LocalUser>(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; |
