mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-12 00:20:42 +01:00
Fix admin spawn verb (#22178)
# Summary This PR adds a argument check to the spawn verb to prevent server lag caused by searching all atoms. ## Changes - Added length check to admin Spawn verb.
This commit is contained in:
@@ -1024,6 +1024,10 @@ var/global/enabled_spooking = 0
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
if(!length(object)) // Prevent server lag caused by searching all atoms
|
||||
to_chat(src, SPAN_WARNING("Spawn verb requires an argument, partial or full type path, e.g.: Spawn \"/obj/item/toy"))
|
||||
return
|
||||
|
||||
var/list/matches = typesof(/atom)
|
||||
|
||||
for(var/path in matches)
|
||||
|
||||
Reference in New Issue
Block a user