mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-29 19:43:16 +00:00
sanitize() refactor: third pass (misc)
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
return
|
||||
|
||||
//clean the message if it's not sent by a high-rank admin
|
||||
//todo: sanitize for all???
|
||||
if(!check_rights(R_SERVER|R_DEBUG,0))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
@@ -91,7 +92,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 = sanitize(input(C, msg,"[recieve_pm_type] PM 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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/input = input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null
|
||||
var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null, MAX_BOOK_MESSAGE_LEN, extra = 0)
|
||||
if(!input || input == "")
|
||||
custom_event_msg = null
|
||||
log_admin("[usr.key] has cleared the custom event text.")
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
world << "<h1 class='alert'>Custom Event</h1>"
|
||||
world << "<h2 class='alert'>A custom event is starting. OOC Info:</h2>"
|
||||
world << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
world << "<span class='alert'>[custom_event_msg]</span>"
|
||||
world << "<br>"
|
||||
|
||||
// normal verb for players to view info
|
||||
@@ -36,5 +36,5 @@
|
||||
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
src << "<span class='alert'>[custom_event_msg]</span>"
|
||||
src << "<br>"
|
||||
|
||||
@@ -205,7 +205,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
return 0
|
||||
var/obj/item/device/paicard/card = new(T)
|
||||
var/mob/living/silicon/pai/pai = new(card)
|
||||
pai.name = input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text
|
||||
pai.name = sanitizeSafe(input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text)
|
||||
pai.real_name = pai.name
|
||||
pai.key = choice.key
|
||||
card.setPersonality(pai)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
return .(O.vars[variable])
|
||||
|
||||
if("text")
|
||||
var/new_value = input("Enter new text:","Text",O.vars[variable]) as text|null
|
||||
var/new_value = input("Enter new text:","Text",O.vars[variable]) as text|null//todo: sanitize ???
|
||||
if(new_value == null) return
|
||||
O.vars[variable] = new_value
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
switch(class)
|
||||
|
||||
if("text")
|
||||
var_value = input("Enter new text:","Text") as null|text
|
||||
var_value = input("Enter new text:","Text") as null|text//todo: sanitize ???
|
||||
|
||||
if("num")
|
||||
var_value = input("Enter new number:","Num") as null|num
|
||||
@@ -93,7 +93,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
switch(class)
|
||||
|
||||
if("text")
|
||||
var_value = input("Enter new text:","Text") as text
|
||||
var_value = input("Enter new text:","Text") as text//todo: sanitize ???
|
||||
|
||||
if("num")
|
||||
var_value = input("Enter new number:","Num") as num
|
||||
@@ -243,7 +243,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
return
|
||||
|
||||
if("text")
|
||||
L[L.Find(variable)] = input("Enter new text:","Text") as text
|
||||
L[L.Find(variable)] = input("Enter new text:","Text") as text//todo: sanitize ???
|
||||
|
||||
if("num")
|
||||
L[L.Find(variable)] = input("Enter new number:","Num") as num
|
||||
@@ -450,7 +450,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
return .(O.vars[variable])
|
||||
|
||||
if("text")
|
||||
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text
|
||||
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text//todo: sanitize ???
|
||||
if(var_new==null) return
|
||||
O.vars[variable] = var_new
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/msg = input("Message:", text("Subtle PM to [M.key]")) as text
|
||||
var/msg = sanitize(input("Message:", text("Subtle PM to [M.key]")) as text)
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -109,7 +109,7 @@
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
|
||||
var/msg = sanitize(input("Message:", text("Enter the text you wish to appear to everyone:")) as text)
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -132,7 +132,7 @@
|
||||
if(!M)
|
||||
return
|
||||
|
||||
var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
|
||||
var/msg = sanitize(input("Message:", text("Enter the text you wish to appear to your target:")) as text)
|
||||
|
||||
if( !msg )
|
||||
return
|
||||
@@ -475,7 +475,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
|
||||
var/input = sanitize(input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null)
|
||||
if(!input)
|
||||
return
|
||||
for(var/mob/living/silicon/ai/M in mob_list)
|
||||
@@ -523,8 +523,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null
|
||||
var/customname = input(usr, "Pick a title for the report.", "Title") as text|null
|
||||
var/input = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null, extra = 0)
|
||||
var/customname = sanitizeSafe(input(usr, "Pick a title for the report.", "Title") as text|null)
|
||||
if(!input)
|
||||
return
|
||||
if(!customname)
|
||||
|
||||
Reference in New Issue
Block a user