Introducing the Ban API and Alt Account Detection

If the user you are banning is currently in a server, they will be served the kick dialogue (error 267). They will be served the new banned dialogue (error 600) when they attempt to and fail to join.

1 Like

You can use Players.GetBanHistoryAsync or the OpenCloud API List User Restrictions Logs.

2 Likes

Yes, it will kick users in another server AND if the call came from Open Cloud rather than from the engine API.

1 Like

The real answer is because I haven’t gotten around to it yet. But I will soon. Stay tuned :slight_smile:

2 Likes

I noticed that it was only showing the ban dialogue because I was teleporting while being banned. However, is it possible to start allowing new lines in kick messages again? They’re allowed in the ban dialogue but still aren’t allowed in the kick dialogue, which causes some variance in how my display reason shows up.

1 Like

this needs some more support. disregard my previous messages. sandbox experiences or backdoors can have this system taken advantage of.

this deserves to be optionally locked just like HttpService and Loadstrings.

3 Likes

Working on my own BanScript as I write this, I’d also like it if alt account detection was its own isolated thing, it would do wonders for my game.

2 Likes

Don’t worry seems like you are not missing out on much.
As of now I own a semi active 50 CCU game ( i know small ) but it’s still enough to attract up words of 100 bans a day and it seems like alts with almost the same username I.E robloxcoolkid1, robloxcoolkid2, and robloxcoolkid3 so on and so forth just keep coming back.

3 Likes

It’s not that hard to implement, can be done with a function in less then 15 lines.


local function timeToSeconds(timeString: string)
	local days, hours, minutes = 0, 0, 0

	for value, unit in string.gmatch(timeString, "(%d+)([dhm])") do
		value = tonumber(value)
		if unit == "d" then
			days = value
		elseif unit == "h" then
			hours = value
		elseif unit == "m" then
			minutes = value
		end
	end

	local totalSeconds = (days * 86400) + (hours * 3600) + (minutes * 60)
	return totalSeconds
end

local function secondsToTime(seconds)
	local days = math.floor(seconds / 86400)
	seconds = seconds % 86400
	local hours = math.floor(seconds / 3600)
	seconds = seconds % 3600
	local minutes = math.floor(seconds / 60)

	return string.format("%dd %dh %dm", days, hours, minutes)
end
3 Likes

Seems to be MAC address based which isn’t what I would consider bad, but the implementation seems to be done by ChatGPT as it doesn’t even function.

2 Likes

I’ve already implemented it myself, I was just saying that it would be nice if roblox had integrated it anyways. Kinda dumb just to allow seconds.

1 Like

well to ignore complications they should make a :GetBannedUserIds() to just return an array of everyone who is banned, and also a :GetBannedInfo(userid: number) to reques info on the banned userid. tho this might then make complications with api limits.

1 Like

ik(i think :skull:) that the windows unique id resets each time you do a factory reset. idk abt the mac adress tho.

2 Likes

Only metric they currently use for alts is MAC address.
Which still is not bad, but the current implementation is bricked. Like it legit does not work.

1 Like

Out of the hundreds we’ve banned using this new Ban API I am yet to see it work with a single alt account :cry: .

7 Likes

How do I remove a player from ban if it perm?

1 Like

Ahh that is really usefull previously you’d have to use messaging service

1 Like

Cannot wait to introduce the Ban API into my upcoming game, as I experienced from previous games that people would just join on alternative accounts just to continue what they were doing beforehand. Great update!

1 Like

The moderator field is automatically added based on how the API was called. If you call the Open Cloud API directly, it will find the moderator name based on the scope of the API key. If you call it via the engine API, it will say something like “game server.”

I will look into the text filter issue here. For the time being, I would encourage you to avoid having the date time within DisplayReason, as we already display that in the error message to the user. Currently, it shows the time remaining on their ban, but soon it will display a localized date time.

2 Likes