Verify concommand is registered before attempting to execute it.

This commit is contained in:
SticklyMan 2018-02-04 04:32:29 -07:00
parent ba21d08242
commit 26b0139044
2 changed files with 6 additions and 2 deletions

View File

@ -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 )

View File

@ -1 +1 @@
1507560100
1517743950