--[[
	lua/BlockCMD.lua
	=(TGE)= SimpleIsTheBest | (STEAM_0:1:60333045)
	===DStream===
]]

local BCMD = {}
local old_hookadd                       = hook.Add;
local old_hookrem                       = hook.Remove;

BCMD.dontlog                            = { -- commands to be ignored by the runconsolecommand logger
"+jump",
"-jump",
"+attack",
"-attack",
"impulse"
}
BCMD.badcmds                            = { -- commands to be blocked
"__ac",
"__imacheater",
"gm_possess",
"achievementRefresh", -- fuck u lifepunch
"__uc_", -- RIOT
"_____b__c",
"___m",
"sc",
"bg",
"bm",
"kickme",
"gw_iamacheater",
"imafaggot",
"birdcage_browse",
"reportmod",
"_fuckme",
"st_openmenu",
"_NOPENOPE",
"__ping",
"ar_check",
"GForceRecoil",
"~__ac_auth",
"blade_client_check",
"blade_client_detected_message",
"disconnect",
"exit",
"retry",
"kill",
"-voicerecord",
"+voicerecord",
"dac_imcheating", -- fuck u bich
"dac_pleasebanme", -- fuck u bich
"ulx ban simple",
"ulx kick simple",
"hac_unitedhosts_dm_banme",
}

/**************************************
Name: Logger
Purpose: Logs functions and shit
**************************************/
concommand.Add("BCMD_StartLog",function()
file.Write("BCMD/log.txt","Log created: ("..os.date()..") \n")
end)
 
function Log(msg)
file.Append("BCMD/log.txt","["..os.date().."]: "..msg.."\n")
end
Log("Loading....")
 
 
/*******************************************
Name: Print/Chat functions
Purpose: Notify the user of what's going on
********************************************/
function BCMD.Print(msg)
        print("[BCMD] "..msg)
end
 
function BCMD.Notify(dosound,col,msg)
        if col then
                col = col
        end
chat.AddText(
iceblue, "[BCMD] ",
col, msg)
        if dosound == sound then
                local beep = Sound( "/buttons/button17.wav" )
                local beepsound = CreateSound( LocalPlayer(), beep )
                beepsound:Play()
        end
end
 
/***********************************************
Name: Hook functions
Purpose: Add hooks and protect from anticheats
************************************************/
 
-- Addhook
local function AddHook(Type,Function)
        Name = Type.." | "..math.random(1,1000),math.random(1,2000),math.random(1,3000) -- Simple hook names
        BCMD.Print("[ADDED] Hook: ["..Type.."] | Name: "..Name.."")
        return old_hookadd(Type,Name,Function)
end
 
-- RemoveHook
local function RemoveHook(Type,Function)
        BCMD.Print("[REMOVED] Hook: ["..Type.."]")
        return old_hookrem(Type,Function)
end