Allow searching for garbage
authorAri Johnson <ari@theari.com>
Fri, 17 Dec 2010 19:44:16 +0000 (19:44 +0000)
committerAri Johnson <ari@theari.com>
Fri, 22 May 2009 15:04:49 +0000 (15:04 +0000)
(cherry picked from commit a1d0fd5130f19acef0d8026c1ca79311ec07ba16)

src/wiz.c

index 4205b1b6fcf44f950a0afe6d14da54275e19cdf0..863d868dab7d6df924070189103cc85afb1ecefc 100644 (file)
--- a/src/wiz.c
+++ b/src/wiz.c
@@ -1829,6 +1829,8 @@ fill_search_spec(dbref player, const char *owner, int nargs, const char **args,
        spec->type = TYPE_PLAYER;
       } else if (string_prefix("divisions", restriction)) {
         spec->type = TYPE_DIVISION;
+      } else if (string_prefix("garbage", restriction)) {
+        spec->type = TYPE_GARBAGE;
       } else {
        notify(player, T("Unknown type."));
        return -1;
@@ -2006,7 +2008,7 @@ raw_search(dbref player, const char *owner, int nargs, const char **args,
     mush_panic(T("Couldn't allocate memory in search!"));
   
   for (n = spec.low; n <= spec.high; n++) {
-    if (IsGarbage(n))
+    if (IsGarbage(n) && spec.type != TYPE_GARBAGE)
       continue;
     if (spec.owner == ANY_OWNER && !CanSearch(player, Owner(n)))
       continue;