extern void do_enter(dbref player, const char *what);
extern void do_leave(dbref player);
extern void do_empty(dbref player, const char *what);
-extern void do_firstexit(dbref player, const char *what);
+extern void do_firstexit(dbref player, const char **what);
/* From player.c */
extern void do_password(dbref player, dbref cause,
{"@FIND", NULL, cmd_find,
CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_RS_ARGS | CMD_T_NOGAGGED, NULL},
- {"@FIRSTEXIT", NULL, cmd_firstexit, CMD_T_ANY, NULL},
+ {"@FIRSTEXIT", NULL, cmd_firstexit, CMD_T_ANY | CMD_T_ARGS, NULL},
{"@FLAG", "ADD TYPE LETTER LIST RESTRICT DELETE ALIAS DISABLE ENABLE",
cmd_flag,
CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_RS_ARGS | CMD_T_NOGAGGED, NULL},
* \param what name of exit to promote.
*/
void
-do_firstexit(dbref player, const char *what)
+do_firstexit(dbref player, const char **what)
{
dbref thing;
dbref loc;
- if ((thing =
- noisy_match_result(player, what, TYPE_EXIT,
- MAT_ENGLISH | MAT_EXIT)) == NOTHING)
- return;
- loc = Home(thing);
- if (!controls(player, loc)) {
- notify(player, T("You cannot modify exits in that room."));
- return;
+ int i;
+
+ for (i = 1; i < MAX_ARG && what[i]; i++) {
+ if ((thing =
+ noisy_match_result(player, what[i], TYPE_EXIT,
+ MAT_ENGLISH | MAT_EXIT | MAT_ABSOLUTE)) == NOTHING)
+ continue;
+ loc = Home(thing);
+ if (!controls(player, loc)) {
+ notify(player, T("You cannot modify exits in that room."));
+ continue;
+ }
+ Exits(loc) = remove_first(Exits(loc), thing);
+ Source(thing) = loc;
+ PUSH(thing, Exits(loc));
+ notify_format(player, T("%s is now the first exit in %s."), Name(thing), unparse_object(player, loc));
}
- Exits(loc) = remove_first(Exits(loc), thing);
- Source(thing) = loc;
- PUSH(thing, Exits(loc));
- notify_format(player, T("%s is now the first exit."), Name(thing));
}