mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
port ADMIN_VERB and friends (#30646)
* port ADMIN_VERB and friends * some renaming * dumb * one more rename * never search and replace this codebase * fix TM issues, more renaming * add a static analysis to shore up user verbs * fix double message on roundstart * remove macro we're not using yet * convert remaining playsounds verbs * convert more verbs i missed somehow * why is this a completely different signature than everything else * fix ui_interact arg * fix logging view and others * buncha issues caught in TM * fix mentor tickets ui * fix bug report viewing * moron
This commit is contained in:
@@ -15,20 +15,18 @@
|
||||
|
||||
*/
|
||||
|
||||
/client/proc/SDQL2_query()
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_PROCCALL)) //Shouldn't happen... but just to be safe.
|
||||
message_admins("<span class='danger'>ERROR: Non-admin [key_name_admin(usr)] attempted to execute a SDQL query!</span>")
|
||||
log_admin("Non-admin [key_name(usr)] attempted to execute a SDQL query!")
|
||||
USER_VERB(execute_sdql2_query, R_PROCCALL, "SDQL2 Query", "Run an SDQL query", VERB_CATEGORY_DEBUG)
|
||||
if(!check_rights_client(R_PROCCALL, FALSE, client)) //Shouldn't happen... but just to be safe.
|
||||
message_admins("<span class='danger'>ERROR: Non-admin [key_name_admin(client)] attempted to execute a SDQL query!</span>")
|
||||
log_admin("Non-admin [key_name(client)] attempted to execute a SDQL query!")
|
||||
return
|
||||
|
||||
var/query_text = input("SDQL2 query") as message
|
||||
var/query_text = input(client, "SDQL2 query") as message
|
||||
|
||||
if(!query_text || length(query_text) < 1)
|
||||
return
|
||||
|
||||
run_sdql2_query(query_text)
|
||||
client.run_sdql2_query(query_text)
|
||||
|
||||
/client/proc/run_sdql2_query(query_text)
|
||||
if(!check_rights(R_PROCCALL)) //Shouldn't happen... but just to be safe.
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
/client/proc/load_sdql2_query()
|
||||
set category = "Debug"
|
||||
set name = "Load SDQL2 Query"
|
||||
|
||||
if(!check_rights(R_PROCCALL))
|
||||
return
|
||||
|
||||
USER_VERB(load_sdql2_query, R_PROCCALL, "Load SDQL2 Query", "Load SDQL2 Query from data directory.", VERB_CATEGORY_DEBUG)
|
||||
var/list/choices = flist("data/sdql/")
|
||||
var/choice = input(src, "Choose an SDQL script to run:", "Load SDQL Query", null) as null|anything in choices
|
||||
var/choice = input(client, "Choose an SDQL script to run:", "Load SDQL Query", null) as null|anything in choices
|
||||
if(isnull(choice))
|
||||
return
|
||||
|
||||
var/script_text = return_file_text("data/sdql/[choice]")
|
||||
script_text = input(usr, "SDQL2 query", "", script_text) as message
|
||||
script_text = input(client, "SDQL2 query", "", script_text) as message
|
||||
|
||||
if(!script_text || length(script_text) < 1)
|
||||
return
|
||||
|
||||
run_sdql2_query(script_text)
|
||||
client.run_sdql2_query(script_text)
|
||||
|
||||
Reference in New Issue
Block a user