diff --git a/restrict_noaccess/lua/autorun/server/restrict_noaccess.lua b/restrict_noaccess/lua/autorun/server/restrict_noaccess.lua index 6ac2c2d..11d5207 100644 --- a/restrict_noaccess/lua/autorun/server/restrict_noaccess.lua +++ b/restrict_noaccess/lua/autorun/server/restrict_noaccess.lua @@ -1,21 +1,14 @@ -hook.Add("PlayerInitialSpawn", "edshot_pac3_auto_ban_connect", function(player, transition) +hook.Add("PlayerInitialSpawn", "edshot_restrict_noaccess_connect", function(player, transition) local userGroup = player:GetUserGroup() if (userGroup == "user_noaccess") then RunConsoleCommand("pac_ban", player:SteamID()) + RunConsoleCommand("ulx", "gag", player:Nick()) end end) -hook.Add("PlayerDisconnected", "edshot_pac3_auto_ban_disconnect", function(player) - local userGroup = player:GetUserGroup() - - if (userGroup == "user_noaccess") then - RunConsoleCommand("pac_unban", player:SteamID()) - end -end) - -hook.Add("ULibUserGroupChange", "edshot_pac3_auto_ban_groupchange", function(id, allows, denies, new_group, old_group) +hook.Add("ULibUserGroupChange", "edshot_restrict_noaccess_groupchange", function(id, allows, denies, new_group, old_group) if (new_group == "user_noaccess") then RunConsoleCommand("pac_ban", id) end