mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Implements IPIntel, Panic Bunker, and custom access control (#2436)
What it says on the tin. IPIntel and BYOND account age relating panic bunker settings from TG. Also implements methods for potentially tagging VM users. Ontop of all of this, creates a spiffy UI for admins with R_SERVER to adjust the settings of the entire suite at runtime.
This commit is contained in:
@@ -265,6 +265,20 @@ var/list/gamemode_cache = list()
|
||||
var/log_gelf_ip = ""
|
||||
var/log_gelf_port = ""
|
||||
|
||||
//IP Intel vars
|
||||
var/ipintel_email
|
||||
var/ipintel_rating_bad = 1
|
||||
var/ipintel_rating_kick = 0
|
||||
var/ipintel_save_good = 12
|
||||
var/ipintel_save_bad = 1
|
||||
var/ipintel_domain = "check.getipintel.net"
|
||||
|
||||
// Access control/Panic bunker settings.
|
||||
var/access_deny_new_players = 0
|
||||
var/access_deny_new_accounts = -1
|
||||
var/access_deny_vms = 0
|
||||
var/access_warn_vms = 0
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
for (var/T in L)
|
||||
@@ -819,6 +833,27 @@ var/list/gamemode_cache = list()
|
||||
if("log_gelf_port")
|
||||
config.log_gelf_port = value
|
||||
|
||||
if("ipintel_email")
|
||||
if (value != "ch@nge.me")
|
||||
ipintel_email = value
|
||||
if("ipintel_rating_bad")
|
||||
ipintel_rating_bad = text2num(value)
|
||||
if("ipintel_rating_kick")
|
||||
ipintel_rating_kick = text2num(value)
|
||||
if("ipintel_domain")
|
||||
ipintel_domain = value
|
||||
if("ipintel_save_good")
|
||||
ipintel_save_good = text2num(value)
|
||||
if("ipintel_save_bad")
|
||||
ipintel_save_bad = text2num(value)
|
||||
|
||||
if("access_deny_new_accounts")
|
||||
access_deny_new_accounts = text2num(value) >= 0 ? text2num(value) : -1
|
||||
if("access_deny_vms")
|
||||
access_deny_vms = text2num(value)
|
||||
if("access_warn_vms")
|
||||
access_warn_vms = text2num(value)
|
||||
|
||||
else
|
||||
log_misc("Unknown setting in configuration: '[name]'")
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
var/datum/controller/subsystem/ipintel/SSipintel
|
||||
|
||||
/datum/controller/subsystem/ipintel
|
||||
name = "XKeyScore"
|
||||
init_order = SS_INIT_MISC_FIRST
|
||||
flags = SS_NO_FIRE
|
||||
var/enabled = 0 //disable at round start to avoid checking reconnects
|
||||
var/throttle = 0
|
||||
var/errors = 0
|
||||
|
||||
var/list/cache = list()
|
||||
|
||||
/datum/controller/subsystem/ipintel/New()
|
||||
NEW_SS_GLOBAL(SSipintel)
|
||||
|
||||
/datum/controller/subsystem/ipintel/Initialize()
|
||||
enabled = 1
|
||||
. = ..()
|
||||
Reference in New Issue
Block a user