]> git.pond.sub.org Git - empserver/commitdiff
Fix show help text to include news and product
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 1 Aug 2009 19:27:20 +0000 (15:27 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 5 Dec 2009 14:19:37 +0000 (15:19 +0100)
Commit 1bca66c0 added show news and commit 71bbd642 show product
without updating the help text.  Fix that.  The prompt is now too
long, so add option '?' to show it, and change the prompt to refer to
that.

src/lib/commands/show.c

index e2e59b04e23733c5b6061f909ef16bc419fd8b72..677d8c8af0cec37b913c6ba27b456c0d5eba8aa6 100644 (file)
@@ -50,11 +50,14 @@ show(void)
     char buf[1024];
     int rlev;
 
-    p = getstarg(player->argp[1],
-                "Show what (bridge, item, land, nuke, plane, sect, ship, tower, updates)? ",
-                buf);
+again:
+    p = getstarg(player->argp[1], "Show what ('?' to list options)? ", buf);
     if (!p || !*p)
        return RET_SYN;
+    if (*p == '?') {
+       pr("bridge, item, land, news, nuke, plane, sect, ship, product, tower, updates\n");
+       goto again;
+    }
 
     natp = getnatp(player->cnum);
     rlev = (int)(1.25 * natp->nat_level[NAT_RLEV]);