mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Blank PDA fix
This commit is contained in:
@@ -41,6 +41,15 @@
|
||||
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+1)
|
||||
index = findtext(t, char)
|
||||
return t
|
||||
|
||||
/proc/readd_quotes(var/t)
|
||||
var/list/repl_chars = list(""" = "\"")
|
||||
for(var/char in repl_chars)
|
||||
var/index = findtext(t, char)
|
||||
while(index)
|
||||
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+5)
|
||||
index = findtext(t, char)
|
||||
return t
|
||||
|
||||
//Runs byond's sanitization proc along-side sanitize_simple
|
||||
/proc/sanitize(var/t,var/list/repl_chars = null)
|
||||
|
||||
@@ -897,6 +897,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
var/t = input(U, "Please enter message", name, null) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
t = readd_quotes(t)
|
||||
if (!t || !istype(P))
|
||||
return
|
||||
if (!in_range(src, U) && loc != U)
|
||||
|
||||
Reference in New Issue
Block a user