making a simple ip banlist

So basically I have this code:

BannedIPs = {
	"" --Example IP Ban
hook.Add("PlayerInitialSpawn", "CheckBannedIPs", function(ply)
	if (string.find(ply:IPAddress(), BannedIPs, 1, true)) then
		local id = ply:SteamID();
		RunConsoleCommand("ulx", "banid", id, 0, "[IP Blacklisted]");

But I get this error:

143: bad argument #2 to 'find' (string expected, got table)

how would i fix this?

You should use table.HasValue instead of string.find - the error is quite clear as to what the problem is