/* 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" static int inv_thing(char *who, int ac, char **av); /* TinyMUD-like "inventory" */ static int inv_thing (who, ac, av) char *who; int ac; char **av; { int x; char ob[MAXOID]; for (x = 0; x < ac; x++) { if (matchinv (who, av[x], 1, MTCH_UNIQ, ob)) continue; say (who, ut_name (ob), "\n", (char *) 0); } return (UERR_NONE); } /* ARGSUSED */ int cmd_inv (int argc, char *argv[], char *who, char *aswho) { if (argc > 1) return (inv_thing (who, argc - 1, argv + 1)); /* dump things in hand */ if (say_attribute (who, who, var_cont, "You are carrying", 0)) say (who, "You aren't carrying anything.\n", (char *) 0); (void) say_attribute (who, who, var_using, "You are holding", 0); return (UERR_NONE); }