From 19e0f03b2d562ac67b07fc3cbce59e409ad1cb78 Mon Sep 17 00:00:00 2001 From: Axel Cocat Date: Tue, 15 Feb 2022 10:38:12 +0100 Subject: [PATCH] feat: pass ChatHandler to OnCommand call --- src/ElunaLuaEngine_SC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ElunaLuaEngine_SC.cpp b/src/ElunaLuaEngine_SC.cpp index 7a1d70e..89907bd 100644 --- a/src/ElunaLuaEngine_SC.cpp +++ b/src/ElunaLuaEngine_SC.cpp @@ -332,7 +332,7 @@ public: bool CanExecuteCommand(ChatHandler& handler, std::string_view cmdStr) override { - if (!sEluna->OnCommand(handler.IsConsole() ? nullptr : handler.GetSession()->GetPlayer(), std::string(cmdStr).c_str())) + if (!sEluna->OnCommand(handler, std::string(cmdStr).c_str())) { return false; }