From 86c8cf0c8be2b1f34dad425453c8c7f28f35d75b Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Sat, 27 Apr 2019 22:25:04 +0200 Subject: [PATCH] PM's work again --- code/__HELPERS/mobs.dm | 2 +- code/modules/admin/admin.dm | 2 +- code/modules/admin/player_panel.dm | 8 ++++---- code/modules/client/client procs.dm | 4 +--- code/modules/mob/login.dm | 4 ++-- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index fd5fd510e40..1963b977247 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -491,7 +491,7 @@ GLOBAL_LIST_INIT(do_after_once_tracker, list()) to_chat(user, "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];") to_chat(user, "Location = [location_description];") to_chat(user, "[special_role_description]") - to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")]) (CA)") + to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")]) (CA)") // Gets the first mob contained in an atom, and warns the user if there's not exactly one /proc/get_mob_in_atom_with_warning(atom/A, mob/user = usr) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c15600f7bb6..9d5d09c0447 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -78,7 +78,7 @@ var/global/nologevent = 0 body += "VV - " body += "[ADMIN_TP(M,"TP")] - " if(M.client) - body += "PM - " + body += "PM - " body += "[ADMIN_SM(M,"SM")] - " if(ishuman(M) && M.mind) body += "HM -" diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index f50bae146c3..d2d6e9b2b4c 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -300,7 +300,7 @@ [M_name] - [M_rname] - [M_key] ([M_job]) @@ -371,7 +371,7 @@ dat += {"[(M.client ? "[M.client]" : "No client")] X - PM + PM "} switch(is_special_character(M)) if(0) @@ -398,7 +398,7 @@ dname = M return {"[dname][caption][logout_status][M.stat == 2 ? " (DEAD)" : ""] - PM[close ? "" : ""]"} + PM[close ? "" : ""]"} /datum/admins/proc/check_antagonists() if(!check_rights(R_ADMIN)) return @@ -473,7 +473,7 @@ var/mob/M = blob.current if(M) dat += "[ADMIN_PP(M,"[M.real_name]")][M.client ? "" : " (ghost)"][M.stat == 2 ? " (DEAD)" : ""]" - dat += "PM" + dat += "PM" else dat += "Blob not found!" dat += "" diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index a6216c87b1a..f49f44ab2eb 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -73,9 +73,7 @@ //Admin PM if(href_list["priv_msg"]) var/client/C = locate(href_list["priv_msg"]) - if(ismob(C)) //Old stuff can feed-in mobs instead of clients - var/mob/M = C - C = M.client + if(!C) // Might be a stealthmin ID, so pass it in straight C = href_list["priv_msg"] else if(C.UID() != href_list["priv_msg"]) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index fc265722f4a..0a1346fd0ed 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -19,10 +19,10 @@ spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!") if(matches) if(M.client) - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)].") else - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).") /mob/Login()