Fix players showing as DCed when not

This commit is contained in:
tayyyyyyy
2019-06-10 00:20:19 -07:00
parent 3b24d495a3
commit 3105895293
+11 -1
View File
@@ -279,6 +279,9 @@
/datum/pm_tracker/proc/add_message(client/title, client/sender, message, mob/user)
if(!pms[title.key])
pms[title.key] = new /datum/pm_convo(title)
else if(!pms[title.key].client)
// If they DCed earlier, we need to add the client reference back
pms[title.key].client = title
pms[title.key].add(sender, message)
if(!open)
@@ -341,11 +344,18 @@
open = TRUE
/datum/pm_tracker/proc/fancy_title(title)
var/client/C = pms[title].client
var/client/C = pms[title].client || update_client(title)
if(!C)
return "[title] (Disconnected)"
return "[key_name(C, FALSE)] ([ADMIN_QUE(C.mob,"?")]) ([ADMIN_PP(C.mob,"PP")]) ([ADMIN_VV(C.mob,"VV")]) ([ADMIN_SM(C.mob,"SM")]) ([admin_jump_link(C.mob)]) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>)"
/datum/pm_tracker/proc/update_client(title)
var/client/C = GLOB.directory[ckey(title)]
if(C)
pms[title].client = C
return C
return null
/datum/pm_tracker/Topic(href, href_list)
if(href_list["archive"])
pms[href_list["archive"]].archived = !pms[href_list["archive"]].archived