Adminhelp prompts will now be larger to allow you to proofread large responses and PMs (#345)

* bigger box

* even bigger

well not really, but it's better anyway

* fuck i didn't tick these

* bigger /me input

double emote size as well, stop complaining about cutoffs and don't make
me regret this

* cleanup
This commit is contained in:
TalkingCactus
2017-04-09 05:53:44 -04:00
committed by GitHub
parent aa5cc241f7
commit 89a99d78d1
5 changed files with 33 additions and 14 deletions
+15
View File
@@ -45,6 +45,21 @@
log_admin_private("[key_name(usr)] marked [C.key]'s admin help as an IC issue.")
spamcooldown = world.time + 150 // 15 seconds
else if(href_list["markedread"])
if(world.time && spamcooldown > world.time)
to_chat(usr, "Please wait [max(round((spamcooldown - world.time)*0.1, 0.1), 0)] seconds.")
return
var/client/C = locate(href_list["markedread"]) in clients
if(!C)
return
var/msg = "<font color='green' size='2'><b>Your Adminhelp has been marked as read and is under investigation.</b></font>"
to_chat(C, msg)
message_admins("[key_name_admin(usr)] marked [C.key]'s admin help as read and under investigation.")
log_admin_private("[key_name(usr)] marked [C.key]'s admin help as read and under investigation.")
spamcooldown = world.time + 150 // 15 seconds
else if(href_list["stickyban"])
stickyban(href_list["stickyban"],href_list)
+4 -4
View File
@@ -76,7 +76,7 @@
src.verbs |= /client/verb/adminhelp
adminhelptimerid = 0
/client/verb/adminhelp(msg as text)
/client/verb/adminhelp(msg as message)
set category = "Admin"
set name = "Adminhelp"
@@ -94,7 +94,8 @@
//clean the input msg
if(!msg)
return
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
var/list/replace_chars = list("\n"=" ","\t"=" ")
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN),replace_chars)
if(!msg) return
var/original_msg = msg
@@ -107,8 +108,7 @@
if(!mob)
return //this doesn't happen
var/ref_client = "\ref[src]"
msg = "<span class='adminnotice'><b><font color=red>HELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> [ADMIN_QUE(mob)] [ADMIN_PP(mob)] [ADMIN_VV(mob)] [ADMIN_SM(mob)] [ADMIN_FLW(mob)] [ADMIN_TP(mob)] [ADMIN_SMITE(mob)] (<A HREF='?_src_=holder;rejectadminhelp=[ref_client]'>REJT</A>) (<A HREF='?_src_=holder;icissue=[ref_client]'>IC</A>):</b> [msg]</span>"
msg = "<span class='adminnotice'><b><font color=red>HELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> [ADMIN_QUE(mob)] [ADMIN_PP(mob)] [ADMIN_VV(mob)] [ADMIN_SM(mob)] [ADMIN_FLW(mob)] [ADMIN_TP(mob)] [ADMIN_SMITE(mob)] [ADMIN_REJECT(src)] [ADMIN_IC(src)] [ADMIN_MARKREAD(src)]:</b> [msg]</span>"
//send this msg to all admins
+6 -5
View File
@@ -51,8 +51,9 @@
to_chat(src, "<font color='red'>Error: Admin-PM: Client not found.</font>")
return
message_admins("[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.")
var/msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
if (!msg)
var/list/replace_chars = list("\n"=" ","\t"=" ")
var/msg = copytext(sanitize((input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as message|null), replace_chars), 1, MAX_MESSAGE_LEN)
if (!msg|| msg == " ")//if they hit enter and didn't hit cancel, don't send it
message_admins("[key_name_admin(src)] has cancelled their reply to [key_name(C, 0, 0)]'s admin help.")
return
cmd_admin_pm(whom, msg)
@@ -79,7 +80,7 @@
if(!ircreplyamount) //to prevent people from spamming irc
return
if(!msg)
msg = input(src,"Message:", "Private message to Administrator") as text|null
msg = input(src,"Message:", "Private message to Administrator") as message|null
if(!msg)
return
@@ -98,7 +99,7 @@
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as message|null
if(!msg)
return
@@ -163,7 +164,7 @@
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
var/reply = input(C, msg,"Admin PM from-[sendername]", "") as message|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