mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
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 🆑 Richard Blonski admin: Added Ignored CIDs, a message will appear when a player joins with an Ignored CID. /🆑
This commit is contained in:
@@ -809,3 +809,6 @@
|
||||
|
||||
/datum/config_entry/string/policy_json_path
|
||||
default = "policy.json"
|
||||
|
||||
/datum/config_entry/number_list/ignored_cids
|
||||
default = list()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user