if SERVER then
--[[
	-	Version 0.1:
	Thanks to the help of MrPresident on the UlyssesMod.net forums, this is working. Or should be working.
	-	Version 0.2:
	Added ULib's NameChange hook, so if someone changes their name to something that contains one of the words inside "kickstrings", they will get kicked.
	-	Version 0.3:
	Added print-to-chat for admins if someone gets kicked.
	-	Version 0.3.1:
	Added the ALT code ALT + 32 (blank, "spacebar-like" character). It will now kick people that have the blank character in their name.
	
	Other notes:
	Please keep in mind that if you add a word like "ass", people with names like "mass" will get kicked.
	
	
]]
local kickstrings = { 
"faggot", "queer", "nigger", "nigga", "jigaboo", "jiggaboo", "jiggabo", "jigarooni", "jijjiboo",
"jigga", "jigger", "niglet", "niggah", "nigguh", "nigress", "spearchucker", "wetback",
} --Make sure these are ALL lowercase
 
function NameKicker( ply )
	local pname = string.lower( ply:Nick() )
	local bantime = 0 
	for k, v in pairs( kickstrings ) do 
		if string.find( pname, v, 1, true ) then 
			RunConsoleCommand("ulx", "ban", ply:Nick(), "0", "Use of slurs in name.")
		end 
	end 
end
hook.Add( "PlayerInitialSpawn", "NameKicker", NameKicker )


function NameKickOnChange (ply, old, new)
	local bantime2 = 0 
	for k, v in pairs( kickstrings ) do		
		if string.find ( string.lower(new), v ) then						
			RunConsoleCommand("ulx", "ban", ply:Nick(), "0", "Use of slurs in name.")
		end
	end
end
hook.Add( "ULibPlayerNameChanged", "NameKickOnChange", NameKickOnChange )

end