/client/proc/configure_access_control() set category = "Server" set name = "Configure Access Control" if (!check_rights(R_SERVER)) return var/datum/browser/config_window = new(usr, "access_control", "Access Control") config_window.add_head_content("Access Control") var/data = "These settings control who can access the server during this round.
" data += "They must be reset every single time the server restarts.
" data += "If you do not know what these do, you shouldn't be touching them!
" data += "

Hub Visibility Setting:


" data += "Currently [world.visibility ? "VISIBLE" : "HIDDEN"]. Toggle

" data += "

IP Intel Settings:



" data += "

Player Age Settings:



" data += "

VM Detection Settings:


" config_window.set_user(src.mob) config_window.set_content(data) config_window.open() /datum/admins/proc/access_control_topic(control) if (!control) to_chat(usr, "No control option sent. Cancelling.") return if (!check_rights(R_SERVER)) log_and_message_admins("has tried editing access control without the permissions to do so.") return switch(control) if ("intel_bad") var/num = input("Please set the new threshold for warning based on IPintel (0 to disable).", "New Threshold", config.ipintel_rating_kick) as num if (num < 0 || num > 1) to_chat(usr, "Invalid number. Cancelling.") return config.ipintel_rating_bad = num if (num) log_and_message_admins("has set the IPIntel warn threshold to [num].") else log_and_message_admins("has disabled warn based on IPIntel.") if ("intel_kick") var/num = input("Please set the new threshold for kicking based on IPintel (0 to disable).", "New Threshold", config.ipintel_rating_kick) as num if (num < 0 || num > 1) to_chat(usr, "Invalid number. Cancelling.") return config.ipintel_rating_kick = num if (num) log_and_message_admins("has set the IPIntel kick threshold to [num].") else log_and_message_admins("has disabled kicking based on IPIntel.") if ("new_players") config.access_deny_new_players = !config.access_deny_new_players log_and_message_admins("has [config.access_deny_new_players ? "ENABLED" : "DISABLED"] the kicking of new players.") if ("new_accounts") var/num = input("Please set the new threshold for denying access based on BYOND account age. (-1 to disable.)", "New Threshold", config.access_deny_new_accounts) as num if (num < 0 && num != -1) to_chat(usr, "Invalid number. Cancelling.") return config.access_deny_new_accounts = num if (num != -1) log_and_message_admins("has set the access barrier for new BYOND accounts to [num] days.") else log_and_message_admins("has disabled kicking based on BYOND account age.") if ("vm_warn") var/num = input("Please set the new threshold for warning on login based on positive VM identifiers. (0 to disable.)", "New Threshold") in list(0, 1, 2) config.access_warn_vms = num if (num) log_and_message_admins("has set players with [config.access_warn_vms] positive identifiers out of 2 for VM usage to be warned.") else log_and_message_admins("has disabled warnings based on potential VM usage.") if ("vm_kick") var/num = input("Please set the new threshold for warning on login based on positive VM identifiers. (0 to disable.)", "New Threshold") in list(0, 1, 2) config.access_deny_vms = num if (num) log_and_message_admins("has set players with [config.access_deny_vms] positive identifiers out of 2 for VM usage to be warned.") else log_and_message_admins("has disabled warnings based on potential VM usage.") if ("hub") togglehubvisibility() else to_chat(usr, "Unknown control message sent. Cancelling.") owner.configure_access_control()