Raven AnticheatRavenAnticheat

Server exports

Ban, kick, unban, or read your ban list from your own server scripts through Raven, recorded on your dashboard like any other action.

Raven exposes a set of server-side exports so your own resources can act on a player through Raven and read your ban list. Every action, whether a ban, kick, or unban, is recorded on your dashboard exactly like a detection would, so the player shows up in your bans list and stays reviewable.

Ban a player

exports['rac']:ban(source, reason)

Bans the player on source through Raven. The ban is recorded on your dashboard as a manual ban, the player is dropped with your configured ban message, and a ban id is issued.reason is optional and falls back to Banned by an admin. when omitted. Returns true once the ban is recorded, or false if the player is invalid or already being actioned.

server.lua
RegisterCommand('banplayer', function(source, args)
    local target = tonumber(args[1])
    local reason = table.concat(args, ' ', 2)
    if target then
        exports['rac']:ban(target, reason)
    end
end, true)

Kick a player

exports['rac']:kick(source, reason)

Kicks the player on source through Raven. The kick is recorded on your dashboard and the player is dropped with your configured kick message. reason is optional and falls back to Kicked by an admin. when omitted. Returns true once the kick is recorded, or false if the player is invalid.

server.lua
exports['rac']:kick(source, 'Breaking server rules')

Unban a player

exports['rac']:unban(banId, reason)

Removes a ban by its id. Pass the banId shown on the dashboard or returned when the ban was created. The ban is marked as removed, the trust score the ban took is refunded, and the player can connect again. reason is optional. The call is queued and runs against the dashboard, so it returns right away rather than waiting for the result.

server.lua
exports['rac']:unban('ban-1718900000000-a1b2c3d', 'Appeal accepted')

Check if a player is banned

exports['rac']:isbanned(source)

Returns true if the player on source has an active ban on your server, or false otherwise. The check runs against your dashboard, so give it a moment to return and call it for a connected player. An invalid or unknown source returns false.

server.lua
if exports['rac']:isbanned(source) == true then
    print('That player has an active ban.')
end

Read your ban list

exports['rac']:getbans()

Returns a table of your server's active bans, newest first, so you can build your own in-game ban panel. The list is fetched from your dashboard, so give it a moment to return. Each entry is kept minimal:

  • id the ban id, the same value unban takes.
  • reason the ban reason.
  • manual is true when an admin placed the ban and false when a detection did.
server.lua
local bans = exports['rac']:getbans()
if type(bans) == 'table' then
    for _, ban in ipairs(bans) do
        print(ban.id, ban.reason, ban.manual and 'manual' or 'system')
    end
end

Parameters

  • source is the player server id (a number). A string that looks like a number is accepted too.
  • reason is an optional string shown to the player and stored with the record. Leave it off to use the default.
  • banId (unban only) is the id of the ban to remove, the same value shown on your dashboard or returned when the ban was created.