Additional switches are used in @command that only apply when used
with @command/add. These switches are:
- /noeval : The command does not evaluate arguments passed to it.
+ /noparse : The command does not evaluate arguments passed to it.
/eqsplit : The parser parses leftside and rightside
/lsargs : Comma-separated arguments on the left side are parsed.
/rsargs : In conjunction with eqsplit, the right-side arguments,
comma-separated, are parsed individually and passed
to the $-command in @hook/override.
- Any command added without the /noeval switch is provided with the
+ Any command added without the /noparse switch is provided with the
/noeval switch itself, so if you @command/add foo, then foo's arguments
are parsed by default, but you can call foo/noeval. Note: the $-command
needs to make allowances for the /noeval switch in it's matching.
NOEVAL
NOFLAGCOPY
NOISY
+NOPARSE
NOSIG
NOSPACE
NOTIFY
COMLIST commands[] = {
{"@COMMAND",
- "ADD ALIAS DELETE EQSPLIT LOCK LSARGS RSARGS NOEVAL ON OFF QUIET ENABLE DISABLE RESTRICT",
+ "ADD ALIAS DELETE EQSPLIT LOCK LSARGS RSARGS NOEVAL ON OFF QUIET ENABLE DISABLE RESTRICT NOPARSE",
cmd_command,
CMD_T_PLAYER | CMD_T_EQSPLIT, NULL },
{"@@", NULL, cmd_null, CMD_T_ANY | CMD_T_NOPARSE, NULL},
}
if (SW_ISSET(sw, SWITCH_ADD)) {
int flags = CMD_T_ANY;
- flags |= SW_ISSET(sw, SWITCH_NOEVAL) ? CMD_T_NOPARSE : 0;
+ flags |= SW_ISSET(sw, SWITCH_NOPARSE) ? CMD_T_NOPARSE : 0;
flags |= SW_ISSET(sw, SWITCH_RSARGS) ? CMD_T_RS_ARGS : 0;
flags |= SW_ISSET(sw, SWITCH_LSARGS) ? CMD_T_LS_ARGS : 0;
flags |= SW_ISSET(sw, SWITCH_LSARGS) ? CMD_T_LS_ARGS : 0;
flags |= SW_ISSET(sw, SWITCH_EQSPLIT) ? CMD_T_EQSPLIT : 0;
+ if (SW_ISSET(sw, SWITCH_NOEVAL))
+ notify(player,
+ T
+ ("WARNING: /NOEVAL no longer creates a Noparse command.\n Use /NOPARSE if that's what you meant."));
do_command_add(player, arg_left, flags);
return;
}
{"NOEVAL", SWITCH_NOEVAL},
{"NOFLAGCOPY", SWITCH_NOFLAGCOPY},
{"NOISY", SWITCH_NOISY},
+ {"NOPARSE", SWITCH_NOPARSE},
{"NOSIG", SWITCH_NOSIG},
{"NOSPACE", SWITCH_NOSPACE},
{"NOTIFY", SWITCH_NOTIFY},