From: Ari Johnson Date: Fri, 17 Dec 2010 19:44:16 +0000 (+0000) Subject: Allow searching for garbage X-Git-Tag: 0.73p2~15 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=d2f6a1b3324bfd2696bdf45aa5a1880e136d44fc;p=cobramush.git Allow searching for garbage (cherry picked from commit a1d0fd5130f19acef0d8026c1ca79311ec07ba16) --- diff --git a/src/wiz.c b/src/wiz.c index 4205b1b..863d868 100644 --- 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;