/*
Copyright (C) 1991, Marcus J. Ranum. All rights reserved.
*/
/* configure all options BEFORE including system stuff. */
#include "config.h"
#include "mud.h"
#include "match.h"
#include "vars.h"
/*
dump an object to the player in OIF format
*/
/* ARGSUSED */
int cmd__dump (int argc, char *argv[], char *who, char *aswho)
{
Obj *op;
int xx;
char ob[MAXOID];
int wiz;
wiz = ut_flagged (aswho, var_wiz);
for (xx = 1; xx < argc; xx++) {
if (matchlocal (who, argv[xx], ut_loc (who),
MTCH_UNIQ | MTCH_MEOK | MTCH_NONLOC, ob))
continue;
if (!wiz && !ut_isobjown (aswho, ob)) {
say (who, "You don't own ", ut_name (ob), ".\n", (char *) 0);
continue;
}
if ((op = cache_get (ob)) == (Obj *) 0) {
say (who, "no object ", ob, "\n", (char *) 0);
} else {
(void) oiftowho (op, who, ob);
}
}
return (UERR_NONE);
}