mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
stops kevinz from leaking his IP
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
set desc = "Area to jump to"
|
||||
set category = "Admin"
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
||||
return
|
||||
|
||||
if(!A)
|
||||
@@ -15,20 +15,22 @@
|
||||
continue
|
||||
turfs.Add(T)
|
||||
|
||||
var/turf/T = safepick(turfs)
|
||||
if(!T)
|
||||
to_chat(src, "Nowhere to jump to!")
|
||||
if(length(turfs))
|
||||
var/turf/T = pick(turfs)
|
||||
usr.forceMove(T)
|
||||
log_admin("[key_name(usr)] jumped to [AREACOORD(T)]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [AREACOORD(T)]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Area") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else
|
||||
to_chat(src, "Nowhere to jump to!", confidential = TRUE)
|
||||
return
|
||||
usr.forceMove(T)
|
||||
log_admin("[key_name(usr)] jumped to [AREACOORD(A)]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [AREACOORD(A)]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Area") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/jumptoturf(turf/T in world)
|
||||
set name = "Jump to Turf"
|
||||
set category = "Admin"
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] jumped to [AREACOORD(T)]")
|
||||
@@ -42,7 +44,7 @@
|
||||
set name = "Jump to Mob"
|
||||
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
@@ -54,14 +56,14 @@
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
A.forceMove(M.loc)
|
||||
else
|
||||
to_chat(A, "This mob is not located in the game world.")
|
||||
to_chat(A, "This mob is not located in the game world.", confidential = TRUE)
|
||||
|
||||
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
|
||||
set category = "Admin"
|
||||
set name = "Jump to Coordinate"
|
||||
|
||||
if (!holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
||||
return
|
||||
|
||||
if(src.mob)
|
||||
@@ -76,7 +78,7 @@
|
||||
set name = "Jump to Key"
|
||||
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
@@ -84,7 +86,7 @@
|
||||
keys += M.client
|
||||
var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
to_chat(src, "No keys found.")
|
||||
to_chat(src, "No keys found.", confidential = TRUE)
|
||||
return
|
||||
var/mob/M = selection.mob
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
@@ -99,7 +101,7 @@
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
||||
return
|
||||
|
||||
var/atom/loc = get_turf(usr)
|
||||
@@ -116,7 +118,7 @@
|
||||
set desc = "Key to teleport"
|
||||
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
@@ -142,16 +144,17 @@
|
||||
set category = "Admin"
|
||||
set name = "Send Mob"
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
||||
return
|
||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in GLOB.sortedAreas|null
|
||||
if(A && istype(A))
|
||||
if(M.forceMove(safepick(get_area_turfs(A))))
|
||||
var/list/turfs = get_area_turfs(A)
|
||||
if(length(turfs) && M.forceMove(pick(turfs)))
|
||||
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)] to [AREACOORD(A)]")
|
||||
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)] to [AREACOORD(A)]"
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)] to [AREACOORD(M)]")
|
||||
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)] to [AREACOORD(M)]"
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
else
|
||||
to_chat(src, "Failed to move mob to a valid location.")
|
||||
to_chat(src, "Failed to move mob to a valid location.", confidential = TRUE)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Send Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
#define IRCREPLYCOUNT 2
|
||||
|
||||
#define EXTERNALREPLYCOUNT 2
|
||||
|
||||
//allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm
|
||||
/client/proc/cmd_admin_pm_context(mob/M in GLOB.mob_list)
|
||||
set category = null
|
||||
set name = "Admin PM Mob"
|
||||
if(!holder)
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM-Context: Only administrators may use this command.</span>")
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM-Context: Only administrators may use this command.</span>", confidential = TRUE)
|
||||
return
|
||||
if( !ismob(M) || !M.client )
|
||||
return
|
||||
@@ -18,7 +17,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Admin PM"
|
||||
if(!holder)
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM-Panel: Only administrators may use this command.</span>")
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM-Panel: Only administrators may use this command.</span>", confidential = TRUE)
|
||||
return
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
@@ -37,7 +36,7 @@
|
||||
|
||||
/client/proc/cmd_ahelp_reply(whom)
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>")
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>", confidential = TRUE)
|
||||
return
|
||||
var/client/C
|
||||
if(istext(whom))
|
||||
@@ -48,46 +47,62 @@
|
||||
C = whom
|
||||
if(!C)
|
||||
if(holder)
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: Client not found.</span>")
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: Client not found.</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
var/datum/admin_help/AH = C.current_ticket
|
||||
|
||||
if(AH)
|
||||
message_admins("[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.")
|
||||
message_admins("[key_name_admin(src)] has started replying to [key_name_admin(C, 0, 0)]'s admin help.")
|
||||
var/msg = input(src,"Message:", "Private message to [C.holder?.fakekey ? "an Administrator" : key_name(C, 0, 0)].") as message|null
|
||||
if (!msg)
|
||||
message_admins("[key_name_admin(src)] has cancelled their reply to [key_name(C, 0, 0)]'s admin help.")
|
||||
message_admins("[key_name_admin(src)] has cancelled their reply to [key_name_admin(C, 0, 0)]'s admin help.")
|
||||
return
|
||||
if(!C) //We lost the client during input, disconnected or relogged.
|
||||
if(GLOB.directory[AH.initiator_ckey]) // Client has reconnected, lets try to recover
|
||||
whom = GLOB.directory[AH.initiator_ckey]
|
||||
else
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: Client not found.</span>", confidential = TRUE)
|
||||
to_chat(src, "<span class='danger'><b>Message not sent:</b></span><br>[msg]", confidential = TRUE)
|
||||
AH.AddInteraction("<b>No client found, message not sent:</b><br>[msg]")
|
||||
return
|
||||
cmd_admin_pm(whom, msg)
|
||||
|
||||
//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(whom, msg)
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>")
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
if(!holder && !current_ticket) //no ticket? https://www.youtube.com/watch?v=iHSPf6x1Fdo
|
||||
to_chat(src, "<span class='danger'>You can no longer reply to this ticket, please open another one by using the Adminhelp verb if need be.</span>")
|
||||
to_chat(src, "<span class='notice'>Message: [msg]</span>")
|
||||
to_chat(src, "<span class='danger'>You can no longer reply to this ticket, please open another one by using the Adminhelp verb if need be.</span>", confidential = TRUE)
|
||||
to_chat(src, "<span class='notice'>Message: [msg]</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
var/client/recipient
|
||||
var/irc = 0
|
||||
var/recipient_ckey // Stored in case client is deleted between this and after the message is input
|
||||
var/datum/admin_help/recipient_ticket // Stored in case client is deleted between this and after the message is input
|
||||
var/external = 0
|
||||
if(istext(whom))
|
||||
if(whom[1] == "@")
|
||||
whom = findStealthKey(whom)
|
||||
if(whom == "IRCKEY")
|
||||
irc = 1
|
||||
external = 1
|
||||
else
|
||||
recipient = GLOB.directory[whom]
|
||||
else if(istype(whom, /client))
|
||||
recipient = whom
|
||||
|
||||
if(!recipient)
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: Client not found.</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
if(irc)
|
||||
if(!ircreplyamount) //to prevent people from spamming irc/discord
|
||||
recipient_ckey = recipient.ckey
|
||||
recipient_ticket = recipient.current_ticket
|
||||
|
||||
if(external)
|
||||
if(!externalreplyamount) //to prevent people from spamming irc/discord
|
||||
return
|
||||
if(!msg)
|
||||
msg = input(src,"Message:", "Private message to Administrator") as message|null
|
||||
@@ -95,21 +110,11 @@
|
||||
if(!msg)
|
||||
return
|
||||
if(holder)
|
||||
to_chat(src, "<span class='danger'>Error: Use the admin IRC channel, nerd.</span>")
|
||||
to_chat(src, "<span class='danger'>Error: Use the admin IRC/Discord channel, nerd.</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
|
||||
else
|
||||
if(!recipient)
|
||||
if(holder)
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: Client not found.</span>")
|
||||
if(msg)
|
||||
to_chat(src, msg)
|
||||
return
|
||||
else if(msg) // you want to continue if there's no message instead of returning now
|
||||
current_ticket.MessageNoRecipient(msg)
|
||||
return
|
||||
|
||||
//get message text, limit it's length.and clean/escape html
|
||||
if(!msg)
|
||||
msg = input(src,"Message:", "Private message to [recipient.holder?.fakekey ? "an Administrator" : key_name(recipient, 0, 0)].") as message|null
|
||||
@@ -117,22 +122,30 @@
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>")
|
||||
return
|
||||
|
||||
if(!recipient)
|
||||
if(!recipient)
|
||||
if(GLOB.directory[recipient_ckey]) // Client has reconnected, lets try to recover
|
||||
recipient = GLOB.directory[recipient_ckey]
|
||||
else
|
||||
if(holder)
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: Client not found.</span>")
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: Client not found.</span>", confidential = TRUE)
|
||||
to_chat(src, "<span class='danger'><b>Message not sent:</b></span><br>[msg]", confidential = TRUE)
|
||||
if(recipient_ticket)
|
||||
recipient_ticket.AddInteraction("<b>No client found, message not sent:</b><br>[msg]")
|
||||
return
|
||||
else
|
||||
current_ticket.MessageNoRecipient(msg)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: You are unable to use admin PM-s (muted).</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||
return
|
||||
|
||||
//clean the message if it's not sent by a high-rank admin
|
||||
if(!check_rights(R_SERVER|R_DEBUG,0)||irc)//no sending html to the poor bots
|
||||
if(!check_rights(R_SERVER|R_DEBUG,0)||external)//no sending html to the poor bots
|
||||
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
if(!msg)
|
||||
return
|
||||
@@ -144,28 +157,33 @@
|
||||
|
||||
var/keywordparsedmsg = keywords_lookup(msg)
|
||||
|
||||
if(irc)
|
||||
to_chat(src, "<span class='notice'>PM to-<b>Admins</b>: <span class='linkify'>[rawmsg]</span></span>")
|
||||
var/datum/admin_help/AH = admin_ticket_log(src, "<font color='red'>Reply PM from-<b>[key_name(src, TRUE, TRUE)] to <i>IRC</i>: [keywordparsedmsg]</font>")
|
||||
ircreplyamount--
|
||||
if(external)
|
||||
to_chat(src, "<span class='notice'>PM to-<b>Admins</b>: <span class='linkify'>[rawmsg]</span></span>", confidential = TRUE)
|
||||
var/datum/admin_help/AH = admin_ticket_log(src, "<font color='red'>Reply PM from-<b>[key_name(src, TRUE, TRUE)]</b> to <i>External</i>: [keywordparsedmsg]</font>")
|
||||
externalreplyamount--
|
||||
send2irc("[AH ? "#[AH.id] " : ""]Reply: [ckey]", rawmsg)
|
||||
|
||||
else
|
||||
if(recipient.holder)
|
||||
if(holder) //both are admins
|
||||
to_chat(recipient, "<span class='danger'>Admin PM from-<b>[key_name(src, recipient, 1)]</b>: <span class='linkify'>[keywordparsedmsg]</span></span>")
|
||||
to_chat(src, "<span class='notice'>Admin PM to-<b>[key_name(recipient, src, 1)]</b>: <span class='linkify'>[keywordparsedmsg]</span></span>")
|
||||
var/badmin = FALSE //Lets figure out if an admin is getting bwoinked.
|
||||
if(holder && recipient.holder && !current_ticket) //Both are admins, and this is not a reply to our own ticket.
|
||||
badmin = TRUE
|
||||
if(recipient.holder && !badmin)
|
||||
if(holder)
|
||||
to_chat(recipient, "<span class='danger'>Admin PM from-<b>[key_name(src, recipient, 1)]</b>: <span class='linkify'>[keywordparsedmsg]</span></span>", confidential = TRUE)
|
||||
to_chat(src, "<span class='notice'>Admin PM to-<b>[key_name(recipient, src, 1)]</b>: <span class='linkify'>[keywordparsedmsg]</span></span>", confidential = TRUE)
|
||||
|
||||
//omg this is dumb, just fill in both their tickets
|
||||
var/interaction_message = "<font color='purple'>PM from-<b>[key_name(src, recipient, 1)]</b> to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]</font>"
|
||||
admin_ticket_log(src, interaction_message)
|
||||
if(recipient != src) //reeee
|
||||
admin_ticket_log(recipient, interaction_message)
|
||||
|
||||
// SSblackbox.LogAhelp(current_ticket.id, "Reply", msg, recipient.ckey, src.ckey)
|
||||
else //recipient is an admin but sender is not
|
||||
var/replymsg = "Reply PM from-<b>[key_name(src, recipient, 1)]</b>: <span class='linkify'>[keywordparsedmsg]</span>"
|
||||
admin_ticket_log(src, "<font color='red'>[replymsg]</font>")
|
||||
to_chat(recipient, "<span class='danger'>[replymsg]</span>")
|
||||
to_chat(src, "<span class='notice'>PM to-<b>Admins</b>: <span class='linkify'>[msg]</span></span>")
|
||||
to_chat(recipient, "<span class='danger'>[replymsg]</span>", confidential = TRUE)
|
||||
to_chat(src, "<span class='notice'>PM to-<b>Admins</b>: <span class='linkify'>[msg]</span></span>", confidential = TRUE)
|
||||
// SSblackbox.LogAhelp(current_ticket.id, "Reply", msg, recipient.ckey, src.ckey)
|
||||
|
||||
//play the receiving admin the adminhelp sound (if they have them enabled)
|
||||
if(recipient.prefs.toggles & SOUND_ADMINHELP)
|
||||
@@ -173,78 +191,88 @@
|
||||
|
||||
else
|
||||
if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT
|
||||
var/already_logged = FALSE
|
||||
if(!recipient.current_ticket)
|
||||
new /datum/admin_help(msg, recipient, TRUE)
|
||||
already_logged = TRUE
|
||||
// SSblackbox.LogAhelp(recipient.current_ticket.id, "Ticket Opened", msg, recipient.ckey, src.ckey)
|
||||
|
||||
to_chat(recipient, "<font color='red' size='4'><b>-- Administrator private message --</b></font>")
|
||||
to_chat(recipient, "<span class='danger'>Admin PM from-<b>[key_name(src, recipient, 0)]</b>: <span class='linkify'>[msg]</span></span>")
|
||||
to_chat(recipient, "<span class='danger'><i>Click on the administrator's name to reply.</i></span>")
|
||||
to_chat(src, "<span class='notice'>Admin PM to-<b>[key_name(recipient, src, 1)]</b>: <span class='linkify'>[msg]</span></span>")
|
||||
to_chat(recipient, "<font color='red' size='4'><b>-- Administrator private message --</b></font>", confidential = TRUE)
|
||||
to_chat(recipient, "<span class='adminsay'>Admin PM from-<b>[key_name(src, recipient, 0)]</b>: <span class='linkify'>[msg]</span></span>", confidential = TRUE)
|
||||
to_chat(recipient, "<span class='adminsay'><i>Click on the administrator's name to reply.</i></span>", confidential = TRUE)
|
||||
to_chat(src, "<span class='notice'>Admin PM to-<b>[key_name(recipient, src, 1)]</b>: <span class='linkify'>[msg]</span></span>", confidential = TRUE)
|
||||
|
||||
admin_ticket_log(recipient, "<font color='purple'>PM From [key_name_admin(src)]: [keywordparsedmsg]</font>")
|
||||
|
||||
// if(!already_logged) //Reply to an existing ticket
|
||||
// SSblackbox.LogAhelp(recipient.current_ticket.id, "Reply", msg, recipient.ckey, src.ckey)
|
||||
|
||||
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
SEND_SOUND(recipient, sound('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_GET(flag/popup_admin_pm))
|
||||
spawn() //so we don't hold the caller proc up. Please functionalize this
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
var/reply = input(recipient, msg,"Admin PM from-[sendername]", "") as message|null //show message and await a reply
|
||||
if(recipient && reply)
|
||||
if(sender)
|
||||
recipient.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
|
||||
else
|
||||
adminhelp(reply) //sender has left, adminhelp instead
|
||||
return
|
||||
INVOKE_ASYNC(src, .proc/popup_admin_pm, recipient, msg)
|
||||
|
||||
else //neither are admins
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</span>")
|
||||
to_chat(src, "<span class='danger'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
if(irc)
|
||||
log_admin_private("PM: [key_name(src)]->IRC: [rawmsg]")
|
||||
if(external)
|
||||
log_admin_private("PM: [key_name(src)]->External: [rawmsg]")
|
||||
for(var/client/X in GLOB.admins)
|
||||
to_chat(X, "<span class='notice'><B>PM: [key_name(src, X, 0)]->IRC:</B> [keywordparsedmsg]</span>")
|
||||
to_chat(X, "<span class='notice'><B>PM: [key_name(src, X, 0)]->External:</B> [keywordparsedmsg]</span>", confidential = TRUE)
|
||||
else
|
||||
window_flash(recipient, ignorepref = TRUE)
|
||||
log_admin_private("PM: [key_name(src)]->[key_name(recipient)]: [rawmsg]")
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(X.key!=key && X.key!=recipient.key) //check client/X is an admin and isn't the sender or recipient
|
||||
to_chat(X, "<span class='notice'><B>PM: [key_name(src, X, 0)]->[key_name(recipient, X, 0)]:</B> [keywordparsedmsg]</span>" )
|
||||
to_chat(X, "<span class='notice'><B>PM: [key_name(src, X, 0)]->[key_name(recipient, X, 0)]:</B> [keywordparsedmsg]</span>" , confidential = TRUE)
|
||||
|
||||
/client/proc/popup_admin_pm(client/recipient, msg)
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
var/reply = input(recipient, msg,"Admin PM from-[sendername]", "") as message|null //show message and await a reply
|
||||
if(recipient && reply)
|
||||
if(sender)
|
||||
recipient.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
|
||||
else
|
||||
adminhelp(reply) //sender has left, adminhelp instead
|
||||
|
||||
|
||||
|
||||
#define IRC_AHELP_USAGE "Usage: ticket <close|resolve|icissue|reject|reopen \[ticket #\]|list>"
|
||||
/proc/IrcPm(target,msg,sender)
|
||||
return TgsPm(target,msg,sender) //compatability moment.
|
||||
|
||||
#define TGS_AHELP_USAGE "Usage: ticket <close|resolve|icissue|reject|reopen \[ticket #\]|list>"
|
||||
/proc/TgsPm(target,msg,sender)
|
||||
target = ckey(target)
|
||||
var/client/C = GLOB.directory[target]
|
||||
|
||||
var/datum/admin_help/ticket = C ? C.current_ticket : GLOB.ahelp_tickets.CKey2ActiveTicket(target)
|
||||
var/compliant_msg = trim(lowertext(msg))
|
||||
var/irc_tagged = "[sender](IRC)"
|
||||
var/tgs_tagged = "[sender](TGS/External)"
|
||||
var/list/splits = splittext(compliant_msg, " ")
|
||||
if(splits.len && splits[1] == "ticket")
|
||||
if(splits.len < 2)
|
||||
return IRC_AHELP_USAGE
|
||||
return TGS_AHELP_USAGE
|
||||
switch(splits[2])
|
||||
if("close")
|
||||
if(ticket)
|
||||
ticket.Close(irc_tagged)
|
||||
ticket.Close(tgs_tagged)
|
||||
return "Ticket #[ticket.id] successfully closed"
|
||||
if("resolve")
|
||||
if(ticket)
|
||||
ticket.Resolve(irc_tagged)
|
||||
ticket.Resolve(tgs_tagged)
|
||||
return "Ticket #[ticket.id] successfully resolved"
|
||||
if("icissue")
|
||||
if(ticket)
|
||||
ticket.ICIssue(irc_tagged)
|
||||
ticket.ICIssue(tgs_tagged)
|
||||
return "Ticket #[ticket.id] successfully marked as IC issue"
|
||||
if("reject")
|
||||
if(ticket)
|
||||
ticket.Reject(irc_tagged)
|
||||
ticket.Reject(tgs_tagged)
|
||||
return "Ticket #[ticket.id] successfully rejected"
|
||||
if("reopen")
|
||||
if(ticket)
|
||||
@@ -253,7 +281,7 @@
|
||||
if(!isnull(fail))
|
||||
fail = text2num(splits[3])
|
||||
if(isnull(fail))
|
||||
return "Error: No/Invalid ticket id specified. [IRC_AHELP_USAGE]"
|
||||
return "Error: No/Invalid ticket id specified. [TGS_AHELP_USAGE]"
|
||||
var/datum/admin_help/AH = GLOB.ahelp_tickets.TicketByID(fail)
|
||||
if(!AH)
|
||||
return "Error: Ticket #[fail] not found"
|
||||
@@ -275,41 +303,42 @@
|
||||
. += "#[AH.id]"
|
||||
return
|
||||
else
|
||||
return IRC_AHELP_USAGE
|
||||
return TGS_AHELP_USAGE
|
||||
return "Error: Ticket could not be found"
|
||||
|
||||
var/static/stealthkey
|
||||
var/adminname = CONFIG_GET(flag/show_irc_name) ? irc_tagged : "Administrator"
|
||||
var/adminname = CONFIG_GET(flag/show_irc_name) ? tgs_tagged : "Administrator"
|
||||
|
||||
if(!C)
|
||||
return "Error: No client"
|
||||
|
||||
if(!stealthkey)
|
||||
stealthkey = GenIrcStealthKey()
|
||||
stealthkey = GenTgsStealthKey()
|
||||
|
||||
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
if(!msg)
|
||||
return "Error: No message"
|
||||
|
||||
message_admins("IRC message from [sender] to [key_name_admin(C)] : [msg]")
|
||||
log_admin_private("IRC PM: [sender] -> [key_name(C)] : [msg]")
|
||||
message_admins("External message from [sender] to [key_name_admin(C)] : [msg]")
|
||||
log_admin_private("External PM: [sender] -> [key_name(C)] : [msg]")
|
||||
msg = emoji_parse(msg)
|
||||
|
||||
to_chat(C, "<font color='red' size='4'><b>-- Administrator private message --</b></font>")
|
||||
to_chat(C, "<span class='adminsay'>Admin PM from-<b><a href='?priv_msg=[stealthkey]'>[adminname]</A></b>: [msg]</span>")
|
||||
to_chat(C, "<span class='adminsay'><i>Click on the administrator's name to reply.</i></span>")
|
||||
to_chat(C, "<font color='red' size='4'><b>-- Administrator private message --</b></font>", confidential = TRUE)
|
||||
to_chat(C, "<span class='adminsay'>Admin PM from-<b><a href='?priv_msg=[stealthkey]'>[adminname]</A></b>: [msg]</span>", confidential = TRUE)
|
||||
to_chat(C, "<span class='adminsay'><i>Click on the administrator's name to reply.</i></span>", confidential = TRUE)
|
||||
|
||||
admin_ticket_log(C, "<font color='purple'>PM From [irc_tagged]: [msg]</font>")
|
||||
admin_ticket_log(C, "<font color='purple'>PM From [tgs_tagged]: [msg]</font>")
|
||||
|
||||
window_flash(C, ignorepref = TRUE)
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
SEND_SOUND(C, 'sound/effects/adminhelp.ogg')
|
||||
|
||||
C.ircreplyamount = IRCREPLYCOUNT
|
||||
// C.externalreplyamount = EXTERNALREPLYCOUNT
|
||||
C.ircreplyamount = EXTERNALREPLYCOUNT
|
||||
|
||||
return "Message Successful"
|
||||
|
||||
/proc/GenIrcStealthKey()
|
||||
/proc/GenTgsStealthKey()
|
||||
var/num = (rand(0,1000))
|
||||
var/i = 0
|
||||
while(i == 0)
|
||||
@@ -322,4 +351,4 @@
|
||||
GLOB.stealthminID["IRCKEY"] = stealth
|
||||
return stealth
|
||||
|
||||
#undef IRCREPLYCOUNT
|
||||
#undef EXTERNALREPLYCOUNT
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
msg = keywords_lookup(msg)
|
||||
msg = "<span class='adminsay'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> [ADMIN_FLW(mob)]: <span class='message linkify'>[msg]</span></span>"
|
||||
to_chat(GLOB.admins, msg)
|
||||
to_chat(GLOB.admins, msg, confidential = TRUE)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Asay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/mob/living/target = M
|
||||
|
||||
if(!isliving(target))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living")
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living", confidential = TRUE)
|
||||
return
|
||||
|
||||
explosion(target.loc, 0, 0, 0, 0)
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
return
|
||||
|
||||
if (!istype(borgo, /mob/living/silicon/robot))
|
||||
borgo = input("Select a borg", "Select a borg", null, null) as null|anything in GLOB.silicon_mobs
|
||||
borgo = input("Select a borg", "Select a borg", null, null) as null|anything in sortNames(GLOB.silicon_mobs)
|
||||
if (!istype(borgo, /mob/living/silicon/robot))
|
||||
to_chat(usr, "<span class='warning'>Borg is required for borgpanel</span>")
|
||||
to_chat(usr, "<span class='warning'>Borg is required for borgpanel</span>", confidential = TRUE)
|
||||
|
||||
var/datum/borgpanel/borgpanel = new(usr, borgo)
|
||||
|
||||
@@ -25,18 +25,18 @@
|
||||
if(!istype(to_borg))
|
||||
qdel(src)
|
||||
CRASH("Borg panel is only available for borgs")
|
||||
|
||||
user = CLIENT_FROM_VAR(to_user)
|
||||
|
||||
if (!user)
|
||||
CRASH("Borg panel attempted to open to a mob without a client")
|
||||
|
||||
borg = to_borg
|
||||
|
||||
/datum/borgpanel/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.admin_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/datum/borgpanel/ui_state(mob/user)
|
||||
return GLOB.admin_state
|
||||
|
||||
/datum/borgpanel/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "BorgPanel", "Borg Panel", 700, 700, master_ui, state)
|
||||
ui = new(user, src, "BorgPanel")
|
||||
ui.open()
|
||||
|
||||
/datum/borgpanel/ui_data(mob/user)
|
||||
@@ -53,13 +53,13 @@
|
||||
.["upgrades"] = list()
|
||||
for (var/upgradetype in subtypesof(/obj/item/borg/upgrade)-/obj/item/borg/upgrade/hypospray) //hypospray is a dummy parent for hypospray upgrades
|
||||
var/obj/item/borg/upgrade/upgrade = upgradetype
|
||||
if (initial(upgrade.module_type) && !istype(borg.module, initial(upgrade.module_type))) // Upgrade requires a different module
|
||||
if (initial(upgrade.module_type) && !is_type_in_list(borg.module, initial(upgrade.module_type))) // Upgrade requires a different module
|
||||
continue
|
||||
var/installed = FALSE
|
||||
if (locate(upgradetype) in borg)
|
||||
installed = TRUE
|
||||
.["upgrades"] += list(list("name" = initial(upgrade.name), "installed" = installed, "type" = upgradetype))
|
||||
.["laws"] = borg.laws ? borg.laws.get_law_list(include_zeroth = TRUE) : list()
|
||||
.["laws"] = borg.laws ? borg.laws.get_law_list(include_zeroth = TRUE, render_html = FALSE) : list()
|
||||
.["channels"] = list()
|
||||
for (var/k in GLOB.radiochannels)
|
||||
if (k == RADIO_CHANNEL_COMMON)
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
set category = "Special Verbs"
|
||||
set name = "Dsay"
|
||||
set hidden = 1
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
if(!holder)
|
||||
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
||||
return
|
||||
if(!src.mob)
|
||||
if(!mob)
|
||||
return
|
||||
if(prefs.muted & MUTE_DEADCHAT)
|
||||
to_chat(src, "<span class='danger'>You cannot send DSAY messages (muted).</span>")
|
||||
to_chat(src, "<span class='danger'>You cannot send DSAY messages (muted).</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
if (src.handle_spam_prevention(msg,MUTE_DEADCHAT))
|
||||
if (handle_spam_prevention(msg,MUTE_DEADCHAT))
|
||||
return
|
||||
|
||||
msg = copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
@@ -23,14 +23,25 @@
|
||||
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[uppertext(holder.rank)]([src.holder.fakekey ? pick(nicknames) : src.key])</span> says, <span class='message'>\"[emoji_parse(msg)]\"</span></span>"
|
||||
|
||||
// var/rank_name = holder.rank
|
||||
// var/admin_name = key
|
||||
// if(holder.fakekey)
|
||||
// rank_name = pick(strings("admin_nicknames.json", "ranks", "config")) please use this soon.
|
||||
// admin_name = pick(strings("admin_nicknames.json", "names", "config"))
|
||||
// var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[rank_name]([admin_name])</span> says, <span class='message'>\"[emoji_parse(msg)]\"</span></span>"
|
||||
|
||||
for (var/mob/M in GLOB.player_list)
|
||||
if(isnewplayer(M))
|
||||
continue
|
||||
if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
|
||||
to_chat(M, rendered)
|
||||
if (M.stat == DEAD || (M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
|
||||
to_chat(M, rendered, confidential = TRUE)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/get_dead_say()
|
||||
var/msg = input(src, null, "dsay \"text\"") as text
|
||||
var/msg = input(src, null, "dsay \"text\"") as text|null
|
||||
|
||||
if (isnull(msg))
|
||||
return
|
||||
|
||||
dsay(msg)
|
||||
|
||||
@@ -31,5 +31,5 @@
|
||||
src << ftp(file(path))
|
||||
else
|
||||
return
|
||||
to_chat(src, "Attempting to send [path], this may take a fair few minutes if the file is very large.")
|
||||
return
|
||||
to_chat(src, "Attempting to send [path], this may take a fair few minutes if the file is very large.", confidential = TRUE)
|
||||
return
|
||||
|
||||
@@ -164,15 +164,10 @@
|
||||
if(!findtext(title, ".mp3") && !findtext(title, ".mp4")) // IE sucks.
|
||||
to_chat(src, "<span class='warning'>The format is not .mp3/.mp4, IE 8 and above can only support the .mp3/.mp4 format, the music might not play.</span>", confidential = TRUE)
|
||||
|
||||
music_extra_data["link"] = web_sound_input
|
||||
music_extra_data["title"] = title
|
||||
if(title.len > 50) //kev no.
|
||||
title = "Unknown.mp3"
|
||||
|
||||
var/res = alert(usr, "Show the title of and link to this song to the players?\n[title]",, "No", "Yes", "Cancel")
|
||||
switch(res)
|
||||
if("Yes")
|
||||
to_chat(world, "<span class='boldannounce'>An admin played: <a href=\"[web_sound_input]\">[title]</a></span>")
|
||||
if("Cancel")
|
||||
return
|
||||
music_extra_data["title"] = title
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "played_url", 1, list("[ckey]", "[web_sound_input]"))
|
||||
log_admin("[key_name(src)] played web sound: [web_sound_input]")
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
msg = "<span class='mentorsay_admin filter_MSAY'><span class='prefix'>MENTOR:</span> <EM>[key_name(src, 0, 0)]</EM>: <span class='message'>[msg]</span></span>"
|
||||
else
|
||||
msg = "<span class='mentorsay filter_MSAY'><span class='prefix'>MENTOR:</span> <EM>[key_name(src, 0, 0)]</EM>: <span class='message'>[msg]</span></span>"
|
||||
to_chat(GLOB.admins | GLOB.mentors, msg)
|
||||
to_chat(GLOB.admins | GLOB.mentors, msg, confidential = TRUE)
|
||||
|
||||
Reference in New Issue
Block a user