]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/decl.c
Update copyright notice
[empserver] / src / lib / commands / decl.c
index 46b31484bb0f0b30ed215cb05a6e0459d15fb513..9192f855d0f8241b769d102d2b35ff797364e8c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2017, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -38,8 +38,8 @@
 int
 decl(void)
 {
-    struct natstr nat, *natp;
-    int rel;
+    struct natstr nat;
+    enum relations rel;
     int who;
     struct nstr_item ni;
     char *p;
@@ -80,14 +80,13 @@ decl(void)
            return RET_SYN;
     }
 
-    natp = getnatp(who);
     while (nxtitem(&ni, &nat)) {
        if (nat.nat_stat == STAT_UNUSED)
            continue;
        if (who == (natid)ni.cur)
            continue;
        if (opt_HIDDEN) {
-           if (!player->god && !getcontact(natp, ni.cur)) {
+           if (!player->god && !in_contact(who, ni.cur)) {
                pr("You haven't contacted country #%d yet\n", ni.cur);
                continue;
            }