]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/decl.c
Update copyright notice
[empserver] / src / lib / commands / decl.c
index 266603b739373d87902d246a564e40e15e02cf36..ea626cfc6a408b0892f855a653d3b3c8dd9b3f43 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
  *  ---
  *
  *  decl.c: Declare war, neutrality, alliance, hostile or friendly
- * 
+ *
  *  Known contributors to this file:
- *     
+ *
  */
 
 #include <config.h>
 
-#include "misc.h"
-#include "player.h"
-#include "nat.h"
-#include "file.h"
-#include "xy.h"
-#include "nsc.h"
 #include "commands.h"
 #include "optlist.h"
 
@@ -52,9 +46,10 @@ decl(void)
     char *p;
     char buf[1024];
 
-    if (!(p = getstarg(player->argp[1],
-                      "alliance, friendly, neutrality, hostility, or war? ",
-                      buf)))
+    p = getstarg(player->argp[1],
+                "alliance, friendly, neutrality, hostility, or war? ",
+                buf);
+    if (!p)
        return RET_SYN;
     switch (*p) {
     case 'a':
@@ -91,7 +86,7 @@ decl(void)
        return RET_SYN;
     }
 
-    if (!snxtitem(&ni, EF_NATION, player->argp[2]))
+    if (!snxtitem(&ni, EF_NATION, player->argp[2], NULL))
        return RET_SYN;
     who = player->cnum;
     if (player->god) {
@@ -104,7 +99,7 @@ decl(void)
     while (nxtitem(&ni, &nat)) {
        if (nat.nat_stat == STAT_UNUSED)
            continue;
-       if (player->cnum == (natid)ni.cur)
+       if (who == (natid)ni.cur)
            continue;
        if (opt_HIDDEN) {
            if (!player->god && !getcontact(natp, ni.cur)) {