Jump to content

Simple lua protection


Purple

Recommended Posts

We all know there are always going to be some sort of exploit in ET always has always will so for me and my server what i've gone ahead and done just to prevent any way shape or form of guid spoofing mainly is a simple lua file that just whitelists your admin level.

--[[
Simple Lua protection by purple
]]

function et_InitGame( levelTime, randomSeed, restart )
	local SecName = "Simple Sec"
	et.RegisterModname(SecName)

end

function et_ClientConnect( clientNum, firstTime, isBot )
	local clientIp = et.Info_ValueForKey( et.trap_GetUserinfo(clientNum), "ip" )
	local banTime = "300y" -- change this to your ban duration
	local Reason = "Not Whitelisted." -- change this to your ban reason
	local adminLevel = "7" -- change this to your Admin level
	
	if et.G_shrubbot_level( clientNum ) == adminLevel and clientIp ~= "YOUR IP ADDRESS HERE" then -- put your ip address here.
		et.trap_SendConsoleCommand( et.EXEC_APPEND, "!ban ".. clientNum.." "..banTime.." "..Reason.." \n" ) --ban the user.
	end
	
end
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...