Automatic handling of majorly-colliding CIDs (#17414)

This commit is contained in:
AffectedArc07
2022-02-17 11:33:36 +00:00
committed by GitHub
parent 37cba8b915
commit a9b042dc09
3 changed files with 18 additions and 0 deletions
+6
View File
@@ -112,6 +112,12 @@
to_chat(usr, "<span class='danger'>You cannot apply this ban type on yourself.</span>")
return
// Check validity of the CID. Some have a lot of collisions due to bad industry practices (thanks walmart)
if(computerid && (computerid in GLOB.configuration.admin.common_cid_map))
to_chat(usr, "<span class='notice'>You attempted to apply a ban that includes the CID [computerid]. This CID has been ignored for the following reason: [GLOB.configuration.admin.common_cid_map[computerid]]</span>")
// Cancel it out. DO NOT USE NULL HERE. IT MAKES THE DB CRY. USE AN EMPTY STRING.
computerid = ""
var/who
for(var/client/C in GLOB.clients)
if(!who)