@@ -68,8 +68,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!target)
|
||||
to_chat(usr, "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>")
|
||||
return
|
||||
log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
message_admins("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
var/msg = "[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]."
|
||||
log_admin(msg)
|
||||
message_admins(msg)
|
||||
admin_ticket_log(target, msg)
|
||||
returnval = WrapAdminProcCall(target, procname, lst) // Pass the lst as an argument list to the proc
|
||||
else
|
||||
//this currently has no hascall protection. wasn't able to get it working.
|
||||
@@ -90,15 +92,16 @@ GLOBAL_PROTECT(AdminProcCall)
|
||||
UNTIL(!GLOB.AdminProcCall)
|
||||
to_chat(usr, "<span class='adminnotice'>Running your proc</span>")
|
||||
GLOB.AdminProcCall = usr.client.ckey //if this runtimes, too bad for you
|
||||
try
|
||||
if(target == GLOBAL_PROC)
|
||||
. = call(procname)(arglist(arguments))
|
||||
else
|
||||
. = call(procname)(arglist(arguments))
|
||||
catch()
|
||||
//intentionally left blank
|
||||
world.WrapAdminProcCall(target, procname, arguments)
|
||||
GLOB.AdminProcCall = null
|
||||
|
||||
//adv proc call this, ya nerds
|
||||
/world/proc/WrapAdminProcCall(target, procname, list/arguments)
|
||||
if(target == GLOBAL_PROC)
|
||||
return call(procname)(arglist(arguments))
|
||||
else
|
||||
return call(procname)(arglist(arguments))
|
||||
|
||||
/proc/IsAdminAdvancedProcCall()
|
||||
return usr && usr.client && GLOB.AdminProcCall == usr.client.ckey
|
||||
|
||||
@@ -124,7 +127,9 @@ GLOBAL_PROTECT(AdminProcCall)
|
||||
to_chat(usr, "<span class='warning'>Error: callproc_datum(): owner of proc no longer exists.</span>")
|
||||
return
|
||||
log_admin("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
message_admins("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
var/msg = "[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]."
|
||||
message_admins(msg)
|
||||
admin_ticket_log(A, msg)
|
||||
feedback_add_details("admin_verb","Atom ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
var/returnval = WrapAdminProcCall(A, procname, lst) // Pass the lst as an argument list to the proc
|
||||
@@ -803,4 +808,4 @@ GLOBAL_PROTECT(AdminProcCall)
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] pumped a random event.</span>")
|
||||
feedback_add_details("admin_verb","Pump Random Event")
|
||||
log_admin("[key_name(src)] pumped a random event.")
|
||||
log_admin("[key_name(src)] pumped a random event.")
|
||||
Reference in New Issue
Block a user