diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index 71516fdd24f..1b21893807d 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -809,3 +809,6 @@ /datum/config_entry/string/policy_json_path default = "policy.json" + +/datum/config_entry/number_list/ignored_cids + default = list() diff --git a/code/controllers/subsystem/stickyban.dm b/code/controllers/subsystem/stickyban.dm index e19c574a9fa..d08f08d1791 100644 --- a/code/controllers/subsystem/stickyban.dm +++ b/code/controllers/subsystem/stickyban.dm @@ -4,13 +4,21 @@ SUBSYSTEM_DEF(stickyban) var/list/cache = list() var/list/dbcache = list() - var/list/confirmed_exempt = list() + var/list/ignored_cids = list() // will be used as numeric-keyed map var/dbcacheexpire = 0 /datum/controller/subsystem/stickyban/Initialize() + // load IGNORED_CIDS as number_list into a fast lookup map + var/list/ignored_conf = CONFIG_GET(number_list/ignored_cids) + if (ignored_conf && ignored_conf.len) + for (var/num in ignored_conf) + if (isnum(num)) + ignored_cids[num2text(num)] = TRUE + if (length(GLOB.stickybanadminexemptions)) restore_stickybans() + var/list/bannedkeys = sticky_banned_ckeys() //sanitize the sticky ban list diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 20693fc1bed..6ac51bd14d3 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -435,7 +435,15 @@ GLOBAL_LIST_INIT(unrecommended_builds, list( tgui_say.initialize() if(alert_mob_dupe_login && !holder) + // Notify admins if the connecting player's CID is configured to be ignored by stickybans + if (SSstickyban && (computer_id in SSstickyban.ignored_cids)) + message_admins("MULTIKEYING: [key_name_admin(src)] Connecting player joined with IGNORED CID [computer_id].") + log_admin_private("MULTIKEYING: [key_name(src)] Connecting player joined with IGNORED CID [computer_id].") + return + + // If the CID is not ignored, notify the player with the pop-up. var/dupe_login_message = "Your ComputerID has already logged in with another key this round, please log out of this one NOW or risk being banned!" + // Notify admins if the connecting player's CID is a duplicate of another player's CID if (alert_admin_multikey) dupe_login_message += "\nAdmins have been informed." message_admins(span_danger("MULTIKEYING: [key_name_admin(src)] has a matching CID+IP with another player and is clearly multikeying. They have been warned to leave the server or risk getting banned.")) diff --git a/config/config.txt b/config/config.txt index 18e5329c69b..92ec99d8426 100644 --- a/config/config.txt +++ b/config/config.txt @@ -655,3 +655,8 @@ GENERATE_ASSETS_IN_INIT ## Path from the config folder to the policy json POLICY_JSON_PATH policy.json +# Which CIDs will not be considered for stickybans. This is the default CID that Wine spits out, +# and for the purpose of not default banning all Linux players, we'll just ignore it. +# People can spoof this CID and ignore that element of stickybans forever, but they can equally +# just keep generating new ones. Kind of doesn't matter. +IGNORED_CIDS 4055623708