]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/pdump.c
Update copyright notice
[empserver] / src / lib / commands / pdump.c
index 6c21a65f196e5ec73ba0bb3158e2044ef926f42b..82eedf5bc341ca00e0d064700c9a31b967f25ef7 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-2014, 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/>.
  *
  *  ---
  *
@@ -26,7 +25,7 @@
  *  ---
  *
  *  pdump.c: Dump plane information
- * 
+ *
  *  Known contributors to this file:
  *     John Yockey, 1997
  *     Steve McClure, 1998
@@ -36,7 +35,6 @@
 
 #include "commands.h"
 #include "nuke.h"
-#include "optlist.h"
 #include "plane.h"
 
 int
@@ -45,12 +43,13 @@ pdump(void)
     int nplanes;
     struct nstr_item np;
     struct plnstr plane;
+    struct nukstr nuke;
     int field[128];
     struct natstr *natp;
     int n, i;
     time_t now;
 
-    if (!snxtitem(&np, EF_PLANE, player->argp[1]))
+    if (!snxtitem(&np, EF_PLANE, player->argp[1], NULL))
        return RET_SYN;
     prdate();
 
@@ -263,11 +262,11 @@ pdump(void)
            case 19:
                pr(pln_is_in_orbit(&plane)
                   && (plane.pln_flags & PLN_SYNCHRONOUS)
-                   ? " Y" : " N");
+                  ? " Y" : " N");
                break;
            case 20:
-               if (plane.pln_nuketype != -1) {
-                   pr(" %.5s", nchr[(int)plane.pln_nuketype].n_name);
+               if (getnuke(nuk_on_plane(&plane), &nuke)) {
+                   pr(" %.5s", nchr[nuke.nuk_type].n_name);
                    break;
                } else
                    pr(" N/A");