From b85b24250ec22f00a14c785d6409a29377ad8489 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 3 Apr 2023 04:48:52 +0200 Subject: [PATCH] [MIRROR] Fix the notify restart verb. [MDB IGNORE] (#20287) * Fix the notify restart verb. (#74427) This system forgot that the list it was working with stored mention strings (which contain uids) anyways, not uids. :cl: fix: The notify restart verb in the ooc tab should now actually work. /:cl: * Fix the notify restart verb. --------- Co-authored-by: Kyle Spier-Swenson --- code/modules/discord/toggle_notify.dm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/modules/discord/toggle_notify.dm b/code/modules/discord/toggle_notify.dm index 98ac83e9df9..b33c18d950c 100644 --- a/code/modules/discord/toggle_notify.dm +++ b/code/modules/discord/toggle_notify.dm @@ -22,13 +22,13 @@ to_chat(src, span_warning("This requires you to link your Discord account with the \"Link Discord Account\" verb.")) return - else // Linked - for(var/member in SSdiscord.notify_members) // If they are in the list, take them out - if(member == "[stored_id]") - SSdiscord.notify_members -= "[stored_id]" // The list uses strings because BYOND cannot handle a 17 digit integer - to_chat(src, span_notice("You will no longer be notified when the server restarts")) - return // This is necassary so it doesnt get added again, as it relies on the for loop being unsuccessful to tell us if they are in the list or not + var/stored_mention = "<@[stored_id]>" + for(var/member in SSdiscord.notify_members) // If they are in the list, take them out + if(member == stored_mention) + SSdiscord.notify_members -= stored_mention + to_chat(src, span_notice("You will no longer be notified when the server restarts")) + return // This is necassary so it doesnt get added again, as it relies on the for loop being unsuccessful to tell us if they are in the list or not - // If we got here, they arent in the list. Chuck 'em in! - to_chat(src, span_notice("You will now be notified when the server restarts")) - SSdiscord.notify_members += "[stored_id]" // The list uses strings because BYOND cannot handle a 17 digit integer + // If we got here, they arent in the list. Chuck 'em in! + to_chat(src, span_notice("You will now be notified when the server restarts")) + SSdiscord.notify_members += "[stored_mention]"