From 184a9c8a60e0f9026d9e70e07b42c80adb778853 Mon Sep 17 00:00:00 2001 From: 1080pCat <96908085+1080pCat@users.noreply.github.com> Date: Thu, 4 Sep 2025 16:37:49 +1000 Subject: [PATCH] The 2FA warning now prompts the user to the correct menu to setup 2FA (#30112) * The 2FA warning now prompts the user to the correct menu to setup 2FA * Update code/modules/admin/holder2.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> * Update code/modules/client/client_procs.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> --------- Signed-off-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> --- code/modules/admin/holder2.dm | 2 +- code/modules/client/2fa.dm | 4 ++-- code/modules/client/client_procs.dm | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm index ef8771adb7a..da5708eedfb 100644 --- a/code/modules/admin/holder2.dm +++ b/code/modules/admin/holder2.dm @@ -79,7 +79,7 @@ GLOBAL_PROTECT(href_token) restricted_by_2fa = TRUE if(!delay_2fa_complaint) // And tell them about it. - to_chat(owner,"You do not have 2FA enabled. Admin verbs will be unavailable until you have enabled 2FA.") // Very fucking obvious + to_chat(owner,"You do not have 2FA enabled. Admin verbs will be unavailable until you have enabled 2FA.\nTo setup 2FA, head to the following menu: Game Preferences") // Very fucking obvious // Regardless of client, tell BYOND if they should have profiler access. if(rights & (R_DEBUG | R_VIEWRUNTIMES)) diff --git a/code/modules/client/2fa.dm b/code/modules/client/2fa.dm index af9b52c56b9..52c83eff38a 100644 --- a/code/modules/client/2fa.dm +++ b/code/modules/client/2fa.dm @@ -61,7 +61,7 @@ prefs.save_preferences(src) prefs.ShowChoices(usr) if(holder && holder.restricted_by_2fa) - reload_one_admin(ckey) + reload_one_admin(ckey, silent = TRUE) to_chat(usr, "2fa configured, admin verbs enabled.") alert(usr, "Congratulations. 2FA is now setup properly for your account. In preferences, you can change whether you want it to ask for a code on every connection or only when your IP changes") return @@ -114,7 +114,7 @@ prefs.save_preferences(src) prefs.ShowChoices(usr) if(holder && holder.needs_2fa()) - reload_one_admin(ckey) + reload_one_admin(ckey, silent = TRUE) alert(usr, "2FA disabled successfully") /client/proc/has_2fa() diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index f5b60b6c797..01905417b1f 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -454,8 +454,7 @@ to_chat(src, "The queue server is currently [SSqueue.queue_enabled ? "enabled" : "disabled"], with a threshold of [SSqueue.queue_threshold]. This [SSqueue.persist_queue ? "will" : "will not"] persist through rounds.") if(holder && holder.restricted_by_2fa) - to_chat(src,"You do not have 2FA enabled. Admin verbs will be unavailable until you have enabled 2FA.") // Very fucking obvious - + to_chat(src,"You do not have 2FA enabled. Admin verbs will be unavailable until you have enabled 2FA.\nTo setup 2FA, head to the following menu: Game Preferences") // Very fucking obvious // Tell client about their connection to_chat(src, "You are currently connected [prefs.server_region ? "via the [prefs.server_region] relay" : "directly"] to Paradise.") to_chat(src, "You can change this using the Change Region verb in the OOC tab, as selecting a region closer to you may reduce latency.")