Small MC refactor (#20017)

* Small MC refactor

* Order fix

* Nabs tgstation/tgstation#27324

* Oops

* gnarg
This commit is contained in:
AffectedArc07
2023-01-18 12:06:24 -06:00
committed by GitHub
parent ea9e1969a4
commit 946fb4dff6
99 changed files with 337 additions and 465 deletions
+4 -4
View File
@@ -607,11 +607,11 @@
log_debug("check_ip_intel: skip check for player [key_name_admin(src)] connecting from localhost.")
return
if(SSipintel.vpn_whitelist_check(ckey))
if(GLOB.ipintel_manager.vpn_whitelist_check(ckey))
log_debug("check_ip_intel: skip check for player [key_name_admin(src)] [address] on whitelist.")
return
var/datum/ipintel/res = SSipintel.get_ip_intel(address)
var/datum/ipintel/res = GLOB.ipintel_manager.get_ip_intel(address)
ip_intel = res.intel
verify_ip_intel()
@@ -797,7 +797,7 @@
if(!cidcheck_failedckeys[ckey])
message_admins("<span class='adminnotice'>[key_name(src)] has been detected as using a CID randomizer. Connection rejected.</span>")
SSdiscord.send2discord_simple_noadmins("**\[Warning]** [key_name(src)] has been detected as using a CID randomizer. Connection rejected.")
GLOB.discord_manager.send2discord_simple_noadmins("**\[Warning]** [key_name(src)] has been detected as using a CID randomizer. Connection rejected.")
cidcheck_failedckeys[ckey] = TRUE
note_randomizer_user()
@@ -811,7 +811,7 @@
if(cidcheck_failedckeys[ckey])
// Atonement
message_admins("<span class='adminnotice'>[key_name_admin(src)] has been allowed to connect after showing they removed their cid randomizer</span>")
SSdiscord.send2discord_simple_noadmins("**\[Info]** [key_name(src)] has been allowed to connect after showing they removed their cid randomizer.")
GLOB.discord_manager.send2discord_simple_noadmins("**\[Info]** [key_name(src)] has been allowed to connect after showing they removed their cid randomizer.")
cidcheck_failedckeys -= ckey
if(cidcheck_spoofckeys[ckey])
@@ -11,5 +11,5 @@
if(Q.NextRow())
var/watchreason = Q.item[1]
message_admins("<font color='red'><B>Notice: </B></font><font color='#EB4E00'>[key_name_admin(C)] is on the watchlist and has just connected - Reason: [watchreason]</font>")
SSdiscord.send2discord_simple_noadmins("**\[Watchlist]** [key_name(C)] is on the watchlist and has just connected - Reason: [watchreason]")
GLOB.discord_manager.send2discord_simple_noadmins("**\[Watchlist]** [key_name(C)] is on the watchlist and has just connected - Reason: [watchreason]")
C.watchlisted = TRUE
@@ -357,3 +357,11 @@
client.prefs.toggles2 ^= PREFTOGGLE_2_ANON
to_chat(src, "Your key will [(client.prefs.toggles2 & PREFTOGGLE_2_ANON) ? "no longer" : "now"] be shown in certain events (end round reports, deadchat, etc).</span>")
client.prefs.save_preferences(src)
/client/proc/toggle_mctabs()
set name = "Show/Hide MC Tabs"
set category = "Preferences"
set desc = "Shows or hides the MC tabs."
prefs.toggles2 ^= PREFTOGGLE_2_MC_TABS
prefs.save_preferences(src)
to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_MC_TABS) ? "now" : "no longer"] see the MC tabs on the top right.")