]> git.pond.sub.org Git - empserver/commitdiff
Swap zdone's deity arguments
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 20 Jul 2008 13:02:33 +0000 (09:02 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 25 Jul 2008 12:16:38 +0000 (08:16 -0400)
This puts the additional deity argument last.

Deity syntax wasn't documented before.

info/zdone.t
src/lib/commands/zdon.c

index 7f8e77404b5fca5b923a7ca55c6ca7812deba42e..eacf1d23a91c5a02cd1c631f98f90f8391c09a6c 100644 (file)
@@ -31,5 +31,8 @@ command.
 Your zdone state is cleared when an update occurs.
 .s1
 The \*Qshow updates\*U command shows update policy and schedule.
-.sp
+.s1
+For deities, the command takes an additional parameter: the country to
+impersonate.
+.s1
 .SA "show, Updates"
index 346b888334c84d89fcd7805d4e64d0c73a2a086a..44ae01d2668dfdfad78a92a2fef172f710c52056 100644 (file)
@@ -75,19 +75,9 @@ zdon(void)
        pr("Demand updates are not enabled.\n");
        return RET_FAIL;
     }
-    if (player->god) {
-       /* Deity syntax "country what" */
-       whichcnum = natarg(player->argp[1], "Which country no.? ");
-       if (whichcnum < 0)
-           return RET_SYN;
-       p = getstarg(player->argp[2], "Want update? [Yes|No|Check] ", buf);
-    } else {
-       whichcnum = player->cnum;
-       p = getstarg(player->argp[1], "Want update? [Yes|No|Check] ", buf);
-    }
+    p = getstarg(player->argp[1], "Want update? [Yes|No|Check] ", buf);
     if (!p)
        return RET_SYN;
-
     if (*p == 'y' || *p == 'Y') {
        checking = 0;
        wantupd = 1;
@@ -99,6 +89,13 @@ zdon(void)
        wantupd = 0;
     }
 
+    if (player->god) {
+       whichcnum = natarg(player->argp[2], "for which country? ");
+       if (whichcnum < 0)
+           return RET_SYN;
+    } else
+       whichcnum = player->cnum;
+
     if (!(natp = getnatp(whichcnum))) {
        pr("Unable to find country. %d\n", whichcnum);
        pr("Notify the Deity.\n");