mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-26 02:02:39 +00:00
Version 1 of the ahelp overhaul
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
|
||||
//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, var/type="PM")
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
|
||||
return
|
||||
@@ -104,7 +104,7 @@
|
||||
spawn(0) //so we don't hold the caller proc up
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
var/reply = input(C, msg,"[recieve_pm_type] PM from-[sendername]", "") as text|null //show message and await a reply
|
||||
var/reply = input(C, msg,"[recieve_pm_type] [type] 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
|
||||
@@ -112,9 +112,9 @@
|
||||
adminhelp(reply) //sender has left, adminhelp instead
|
||||
return
|
||||
|
||||
recieve_message = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[key_name(src, C, C.holder ? 1 : 0)]</b>: [msg]</font>"
|
||||
recieve_message = "<font color='[recieve_color]'>[type] from-<b>[recieve_pm_type][key_name(src, C, C.holder ? 1 : 0)]</b>: [msg]</font>"
|
||||
C << recieve_message
|
||||
src << "<font color='blue'>[send_pm_type]PM to-<b>[key_name(C, src, holder ? 1 : 0)]</b>: [msg]</font>"
|
||||
src << "<font color='blue'>[send_pm_type][type] to-<b>[key_name(C, src, holder ? 1 : 0)]</b>: [msg]</font>"
|
||||
|
||||
/*if(holder && !C.holder)
|
||||
C.last_pm_recieved = world.time
|
||||
@@ -183,8 +183,20 @@
|
||||
//check client/X is an admin and isn't the sender or recipient
|
||||
if(X == C || X == src)
|
||||
continue
|
||||
if(X.key!=key && X.key!=C.key && (X.holder.rights & R_ADMIN) || (X.holder.rights & (R_MOD|R_MENTOR)) )
|
||||
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
|
||||
if(X.key!=key && X.key!=C.key)
|
||||
switch(type)
|
||||
if("Question")
|
||||
if(X.holder.rights & (R_MOD|R_MENTOR))
|
||||
X << "<B><font color='blue'>[type]: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
|
||||
if("Player Complaint")
|
||||
if(X.holder.rights & R_ADMIN)
|
||||
X << "<B><font color='blue'>[type]: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
|
||||
if("Bug Report")
|
||||
if(X.holder.rights & R_DEBUG)
|
||||
X << "<B><font color='blue'>[type]: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
|
||||
else
|
||||
if((X.holder.rights & R_ADMIN) || (X.holder.rights & (R_MOD|R_MENTOR)) )
|
||||
X << "<B><font color='blue'>[type]: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
|
||||
|
||||
/client/proc/cmd_admin_irc_pm()
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
@@ -212,5 +224,5 @@
|
||||
if(X == src)
|
||||
continue
|
||||
if((X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD))
|
||||
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]->IRC-Admins:</B> \blue [msg]</font>"
|
||||
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]->IRC-Admins:</B> \blue [msg]</font>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user