From fa7b82694da239839c1e88fb5d414d3e9256ed0d Mon Sep 17 00:00:00 2001 From: Letter N <24603524+LetterN@users.noreply.github.com> Date: Wed, 19 Aug 2020 10:04:56 +0800 Subject: [PATCH] src.islazy = TRUE --- code/modules/admin/verbs/adminpm.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 68b9a8e341..b7f05740a3 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -55,7 +55,7 @@ if(AH) message_admins("[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.") - var/msg = stripped_multiline_input(src,"Message:", "Private message to [key_name(C, 0, 0)]") + 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.") return @@ -90,7 +90,7 @@ if(!ircreplyamount) //to prevent people from spamming irc/discord return if(!msg) - msg = stripped_multiline_input(src,"Message:", "Private message to Administrator") + msg = input(src,"Message:", "Private message to Administrator") as message|null if(!msg) return @@ -112,7 +112,7 @@ //get message text, limit it's length.and clean/escape html if(!msg) - msg = stripped_multiline_input(src,"Message:", "Private message to [key_name(recipient, 0, 0)]") + msg = input(src,"Message:", "Private message to [recipient.holder?.fakekey ? "an Administrator" : key_name(recipient, 0, 0)].") as message|null msg = trim(msg) if(!msg) return @@ -133,7 +133,7 @@ //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 - msg = trim(sanitize(msg), MAX_MESSAGE_LEN) + msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN)) if(!msg) return @@ -188,10 +188,10 @@ //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 + spawn() //so we don't hold the caller proc up. Please functionalize this var/sender = src var/sendername = key - var/reply = stripped_multiline_input(recipient, msg,"Admin PM from-[sendername]", "") //show message and await a reply + 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