mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-01 21:21:59 +00:00
Added Admin PM by Key verb
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
//shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm
|
||||
/client/proc/cmd_admin_pm_panel()
|
||||
set category = "Admin"
|
||||
set name = "Admin PM"
|
||||
set name = "Admin PM Name"
|
||||
if(!holder)
|
||||
src << "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>"
|
||||
return
|
||||
@@ -32,6 +32,29 @@
|
||||
cmd_admin_pm(targets[target],null)
|
||||
feedback_add_details("admin_verb","APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
//shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm
|
||||
/client/proc/cmd_admin_pm_by_key_panel()
|
||||
set category = "Admin"
|
||||
set name = "Admin PM Key"
|
||||
if(!holder)
|
||||
src << "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>"
|
||||
return
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
if(T.mob)
|
||||
if(istype(T.mob, /mob/new_player))
|
||||
targets["[T] - (New Player)"] = T
|
||||
else if(istype(T.mob, /mob/dead/observer))
|
||||
targets["[T] - [T.mob.name](Ghost)"] = T
|
||||
else
|
||||
targets["[T] - [T.mob.real_name](as [T.mob.name])"] = T
|
||||
else
|
||||
targets["(No Mob) - [T]"] = T
|
||||
var/list/sorted = sortList(targets)
|
||||
var/target = input(src,"To whom shall we send a message?","Admin PM",null) in sorted|null
|
||||
cmd_admin_pm(targets[target],null)
|
||||
feedback_add_details("admin_verb","APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
//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
|
||||
|
||||
Reference in New Issue
Block a user