forked from TeamUlysses/ulib
Verify concommand is registered before attempting to execute it.
This commit is contained in:
parent
ba21d08242
commit
26b0139044
@ -1370,7 +1370,11 @@ if SERVER then
|
||||
|
||||
local function hookRoute( ply, command, argv )
|
||||
if #argv > 0 then
|
||||
concommand.Run( ply, table.remove( argv, 1 ), argv )
|
||||
local arg1 = table.remove( argv, 1 )
|
||||
local commandTable, _ = concommand.GetTable()
|
||||
if commandTable[arg1] ~= nil then
|
||||
concommand.Run( ply, arg1, argv )
|
||||
end
|
||||
end
|
||||
end
|
||||
concommand.Add( "_u", hookRoute )
|
||||
|
@ -1 +1 @@
|
||||
1507560100
|
||||
1517743950
|
||||
|
Loading…
Reference in New Issue
Block a user