diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm
index 7e1b2cad97a..efea3d1609f 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -35,7 +35,8 @@
//takes input from cmd_admin_pm_context, cmd_admin_pm_panel or /client/Topic and sends them a PM.
//Fetching a message if needed. src is the sender and C is the target client
-/client/proc/cmd_admin_pm(var/client/C, var/msg)
+
+/client/proc/cmd_admin_pm(var/client/C, var/msg = null)
if(prefs.muted & MUTE_ADMINHELP)
src << "Error: Private-Message: You are unable to use PM-s (muted)."
return
@@ -45,14 +46,6 @@
else adminhelp(msg) //admin we are replying to left. adminhelp instead
return
- /*if(C && C.last_pm_recieved + config.simultaneous_pm_warning_timeout > world.time && holder)
- //send a warning to admins, but have a delay popup for mods
- if(holder.rights & R_ADMIN)
- src << "\red Simultaneous PMs warning: that player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]"
- else
- if(alert("That player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]","Simultaneous PMs warning","Continue","Cancel") == "Cancel")
- return*/
-
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message to [key_name(C, 0, holder ? 1 : 0)]") as text|null
@@ -85,7 +78,10 @@
else
recieve_color = "maroon"
send_pm_type = holder.rank + " "
- recieve_pm_type = holder.rank
+ if(!C.holder && holder && holder.fakekey)
+ recieve_pm_type = "Admin"
+ else
+ recieve_pm_type = holder.rank
else if(!C.holder)
src << "Error: Admin-PM: Non-admin to non-admin PM communication is forbidden."
@@ -112,70 +108,15 @@
adminhelp(reply) //sender has left, adminhelp instead
return
- recieve_message = "[recieve_pm_type] PM from-[get_options_bar(C, 1, C.holder ? 1 : 0, 1)]: [msg]"
+ recieve_message = "[recieve_pm_type] PM from-[get_options_bar(src, C.holder ? 1 : 0, C.holder ? 1 : 0, 1)]: [msg]"
C << recieve_message
- src << "[send_pm_type]PM to-[get_options_bar(C, 1, holder ? 1 : 0, 1)]: [msg]"
-
- /*if(holder && !C.holder)
- C.last_pm_recieved = world.time
- C.ckey_last_pm = ckey*/
+ src << "[send_pm_type]PM to-[get_options_bar(C, holder ? 1 : 0, holder ? 1 : 0, 1)]: [msg]"
//play the recieving admin the adminhelp sound (if they have them enabled)
//non-admins shouldn't be able to disable this
if(C.prefs.toggles & SOUND_ADMINHELP)
C << 'sound/effects/adminhelp.ogg'
- /*
- if(C.holder)
- if(holder) //both are admins
- if(holder.rank == "Moderator") //If moderator
- C << "Mod PM from-[key_name(src, C, 1)]: [msg]"
- src << "Mod PM to-[key_name(C, src, 1)]: [msg]"
- else
- C << "Admin PM from-[key_name(src, C, 1)]: [msg]"
- src << "Admin PM to-[key_name(C, src, 1)]: [msg]"
-
- else //recipient is an admin but sender is not
- C << "Reply PM from-[key_name(src, C, 1)]: [msg]"
- src << "PM to-Admins: [msg]"
-
- //play the recieving admin the adminhelp sound (if they have them enabled)
- if(C.prefs.toggles & SOUND_ADMINHELP)
- C << 'sound/effects/adminhelp.ogg'
-
- else
- if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT
- if(holder.rank == "Moderator")
- C << "Mod PM from-[key_name(src, C, 0)]: [msg]"
- C << "Click on the moderators's name to reply."
- src << "Mod PM to-[key_name(C, src, 1)]: [msg]"
- else
- C << "-- Administrator private message --"
- C << "Admin PM from-[key_name(src, C, 0)]: [msg]"
- C << "Click on the administrator's name to reply."
- src << "Admin PM to-[key_name(C, src, 1)]: [msg]"
-
- //always play non-admin recipients the adminhelp sound
- C << 'sound/effects/adminhelp.ogg'
-
- //AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
- if(config.popup_admin_pm)
- spawn() //so we don't hold the caller proc up
- var/sender = src
- var/sendername = key
- var/reply = input(C, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
- if(C && reply)
- if(sender)
- C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
- else
- adminhelp(reply) //sender has left, adminhelp instead
- return
-
- else //neither are admins
- src << "Error: Admin-PM: Non-admin to non-admin PM communication is forbidden."
- return
- */
-
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]")
//we don't use message_admins here because the sender/receiver might get it too