diff --git a/code/modules/modular_computers/NTNet/NTNRC/user.dm b/code/modules/modular_computers/NTNet/NTNRC/user.dm index 41016c072a1..ba837032c47 100644 --- a/code/modules/modular_computers/NTNet/NTNRC/user.dm +++ b/code/modules/modular_computers/NTNet/NTNRC/user.dm @@ -15,6 +15,22 @@ client.handle_ntnet_user_deletion(src) GLOB.ntnet_global.chat_users.Remove(src) + + for(var/datum/ntnet_conversation/chan in channels) + chan.users -= src + if(chan.operator == src) + if(chan.users.len) + chan.operator = pick(chan.users) + else + chan.operator = null + + for(var/datum/ntnet_user/other_user in dm_channels) + var/datum/ntnet_conversation/chan = dm_channels[other_user] + if(istype(chan)) + chan.users -= src + if(istype(other_user) && islist(other_user.dm_channels)) + other_user.dm_channels -= src + channels = null dm_channels = null clients = null diff --git a/html/changelogs/hellfirejag-ntnet-hard-del.yml b/html/changelogs/hellfirejag-ntnet-hard-del.yml new file mode 100644 index 00000000000..a2083d4533d --- /dev/null +++ b/html/changelogs/hellfirejag-ntnet-hard-del.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - bugfix: "Fixed a hard del related to PDA channels."