From c656ba9945ccf7defe83cc2cc9a9483d95d55bb1 Mon Sep 17 00:00:00 2001 From: Richard Blonski <48651647+RichardBlonski@users.noreply.github.com> Date: Thu, 2 Jul 2026 07:34:52 +0300 Subject: [PATCH] Semi Port - Add Wine/Linux users CID to an ignore list (#96484) ## About The Pull Request This PR attempts to somewhat port https://github.com/cmss13-devs/cmss13/pull/11252 In order to add Wine/Linux CID into an ignore list to stop the `Your ComputerID has already logged in with another key this round, please log out of this one NOW or risk being banned!` Jumpscare message from appearing and log users which connect with ignored CID's to admins properly. ### Testing the Pull Reuqest I've attempted to test the PR locally, but I have been unable to replicate the duplicated CID message, so this might need to be **test merged** if approved. In addition, please review the code, my experience with Byond is very limited so feel free to edit, commit, or requested changes per need. ## Why It's Good For The Game If two players with the same CID (such as the case with players who play using Wine), the joining players will get a pop-up saying they are using the same CID and get a **scary** message that they risk getting banned for multiboxing if they don't log off. Experienced game staff, most of the time already know to ignore the CID `4055623708` which is often thrown by Wine. However, players could abuse this fact to still and try to multibox for whatever reason, and even if a legit Linux player uses this CID, giving the admins a separate log for it is useful, to be distinct from normal multibox messages. `MULTIKEYING: [key_name(src)] Connecting player joined with IGNORED CID [computer_id].` ## Changelog :cl: Richard Blonski admin: Added Ignored CIDs, a message will appear when a player joins with an Ignored CID. /:cl: --- code/controllers/configuration/entries/general.dm | 3 +++ code/controllers/subsystem/stickyban.dm | 10 +++++++++- code/modules/client/client_procs.dm | 8 ++++++++ config/config.txt | 5 +++++ 4 files changed, 25 insertions(+), 1 deletion(-) 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