local PLUGIN = PLUGIN

PLUGIN.name = "Whitelist"
PLUGIN.author = "Refosel"
PLUGIN.description = "На скорую руку"

local WhiteList = true
local beta = true

local allowplayers = {
    ["STEAM_0:0:216403892"] = true, -- Refosel
    ["STEAM_0:1:614583782"] = true, -- Бибослав
    ["STEAM_0:0:121926226"] = true, -- Олег
    ["STEAM_0:0:612937862"] = true, -- Бугор
    ["STEAM_0:1:196106795"] = true, -- Акуленок
    ["STEAM_0:0:136760122"] = true, -- Прохор
    ["STEAM_0:0:102882540"] = true, -- Мурка
    ["STEAM_0:0:38428498"] = true, -- Куд
    ["STEAM_0:1:624282080"] = true, -- Арка
    ["STEAM_0:1:190680623"] = true, -- ItzTomber
    ["STEAM_0:1:102153490"] = true, -- Scripty
    ["STEAM_0:0:584005207"] = true -- Ksanex (Оксана)
}

local betatesters = {
    ["STEAM_0:1:171971554"] = true -- чечон
} 

if (SERVER) then
    hook.Add("CheckPassword", "FT_ServWhitelist", function(s64)
        local s = util.SteamIDFrom64(s64)
        if WhiteList then
            if allowplayers[s] then
                return true
            elseif beta and betatesters[s] then
                return true
            else
                return false, "FT Team\n-Зачем тебе сервер для технических работ?).\n-https://discord.gg/4RWsSB2Ay\nС уважением команда, FT Team."
            end
        end
    end)
end
