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:
FabianK3
2026-04-13 14:30:43 +02:00
committed by GitHub
parent de6b297148
commit 4e4c4c4905
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -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)