Prevents people from HREF exploiting around the R&D console.

This commit is contained in:
Andrei Jors
2018-10-09 07:26:00 -04:00
parent 7ee626869e
commit 8ea25b1811

4
code/modules/research/rdconsole.dm Normal file → Executable file
View File

@@ -155,6 +155,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
add_fingerprint(usr)
usr.set_machine(src)
if((href_list["lock"] || screen < 1 || (screen == 1.6 && href_list["menu"] != "1.0")) && !allowed(usr)) //Stops people from HREF exploiting out of the lock screen, but allow it if they have the access.
usr << "Unauthorized Access"
return
if(href_list["menu"]) //Switches menu screens. Converts a sent text string into a number. Saves a LOT of code.
var/temp_screen = text2num(href_list["menu"])
if(temp_screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || allowed(usr) || emagged) //Unless you are making something, you need access.