]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/zdon.c
License upgrade to GPL version 3 or later
[empserver] / src / lib / commands / zdon.c
index 346b888334c84d89fcd7805d4e64d0c73a2a086a..04f9261c0786d26d3ee0b809132af9fcf9e7cd61 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  Empire is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
  *  ---
  *
  *  zdon.c: Update right now
- * 
+ *
  *  Known contributors to this file:
  *     Doug Hay, 1990
- *     Markus Armbruster, 2007
+ *     Markus Armbruster, 2007-2008
  */
 
 /*
@@ -75,23 +74,13 @@ 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;
-    } else if  (*p == 'n' || *p == 'N') {
+    } else if (*p == 'n' || *p == 'N') {
        checking = 0;
        wantupd = 0;
     } else {
@@ -99,6 +88,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");