mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
[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. 🆑 fix: The notify restart verb in the ooc tab should now actually work. /🆑 * Fix the notify restart verb. --------- Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
This commit is contained in:
co-authored by
Kyle Spier-Swenson
parent
715bb9e60d
commit
b85b24250e
@@ -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]"
|
||||
|
||||
Reference in New Issue
Block a user