File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ addCommandHandler("crun",
69
69
function (player , command , ...)
70
70
local commandstring = table.concat ({... }, " " )
71
71
if player then
72
+ outputChatBoxR (getPlayerName (player ) .. " executed client-side command: " .. commandstring , false )
72
73
return triggerClientEvent (player , " doCrun" , rootElement , commandstring )
73
74
else
74
75
return runString (commandstring , false , false )
@@ -81,7 +82,8 @@ function httpRun(commandstring)
81
82
if not user then outputDebugString ( " httpRun can only be called via http" , 2 ) return end
82
83
83
84
-- check acl permission
84
- local objectName = " user." .. getAccountName (user )
85
+ local accName = getAccountName (user )
86
+ local objectName = " user." .. accName
85
87
86
88
if (not hasObjectPermissionTo (objectName , " command.srun" , false )) then
87
89
outputServerLog (getAccountName (user ) .. " from " .. hostname .. " attempted to execute Lua code with missing acl permission (command.srun)" )
@@ -106,6 +108,9 @@ function httpRun(commandstring)
106
108
-- It failed.
107
109
return " Error: " .. results [2 ]
108
110
end
111
+
112
+ outputChatBoxR (" [HTTP] " .. accName .. " from " .. hostname .. " executed command: " .. commandstring , false )
113
+
109
114
if not notReturned then
110
115
local resultsString = " "
111
116
local first = true
You can’t perform that action at this time.
0 commit comments