mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
sanitize renaming id cards via computer and agent cards
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -253,7 +253,11 @@
|
||||
var/t2 = modify
|
||||
//var/t1 = input(usr, "What name?", "ID computer", null) as text
|
||||
if ((authenticated && modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
modify.registered_name = href_list["reg"]
|
||||
var/temp_name = reject_bad_name(href_list["reg"])
|
||||
if(temp_name)
|
||||
modify.registered_name = temp_name
|
||||
else
|
||||
src.visible_message("<span class='notice'>[src] buzzes rudely.</span>")
|
||||
if ("mode")
|
||||
mode = text2num(href_list["mode_target"])
|
||||
if ("print")
|
||||
|
||||
@@ -132,8 +132,8 @@
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
|
||||
if(!src.registered_name)
|
||||
//Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak
|
||||
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)),1,26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall" || t == "") //Same as mob/new_player/prefrences.dm
|
||||
var t = reject_bad_name(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
|
||||
if(!t) //Same as mob/new_player/prefrences.dm
|
||||
alert("Invalid name.")
|
||||
return
|
||||
src.registered_name = t
|
||||
|
||||
Reference in New Issue
Block a user