From 11439cce1e85eb3538b4282fe7268b6be855ffb9 Mon Sep 17 00:00:00 2001
From: Ari Johnson <ari@cobramush.org>
Date: Sat, 24 Feb 2007 15:14:05 +0000
Subject: [PATCH] /noeval switch for @command is now named /noparse

---
 game/txt/hlp/cobra_cmd.hlp | 4 ++--
 src/SWITCHES               | 1 +
 src/command.c              | 8 ++++++--
 src/switchinc.c            | 1 +
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/game/txt/hlp/cobra_cmd.hlp b/game/txt/hlp/cobra_cmd.hlp
index c2addf8..17b587e 100644
--- a/game/txt/hlp/cobra_cmd.hlp
+++ b/game/txt/hlp/cobra_cmd.hlp
@@ -621,14 +621,14 @@ See also: @create
   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.
diff --git a/src/SWITCHES b/src/SWITCHES
index 4e72e1a..38d83ca 100644
--- a/src/SWITCHES
+++ b/src/SWITCHES
@@ -87,6 +87,7 @@ NO
 NOEVAL
 NOFLAGCOPY
 NOISY
+NOPARSE
 NOSIG
 NOSPACE
 NOTIFY
diff --git a/src/command.c b/src/command.c
index 3009c06..e3840de 100644
--- a/src/command.c
+++ b/src/command.c
@@ -60,7 +60,7 @@ int command_lock(const char *name, const char *lock);
 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},
@@ -1504,11 +1504,15 @@ COMMAND (cmd_command) {
   }
   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;
   }
diff --git a/src/switchinc.c b/src/switchinc.c
index 3ffcef0..9751f50 100644
--- a/src/switchinc.c
+++ b/src/switchinc.c
@@ -89,6 +89,7 @@ SWITCH_VALUE switch_list[] = {
   {"NOEVAL", SWITCH_NOEVAL},
   {"NOFLAGCOPY", SWITCH_NOFLAGCOPY},
   {"NOISY", SWITCH_NOISY},
+  {"NOPARSE", SWITCH_NOPARSE},
   {"NOSIG", SWITCH_NOSIG},
   {"NOSPACE", SWITCH_NOSPACE},
   {"NOTIFY", SWITCH_NOTIFY},
-- 
2.30.2