]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/rela.c
Update copyright notice
[empserver] / src / lib / commands / rela.c
index c2c567e7c6df64e1108ed5599b047d165d943d03..d68245999a36ee34d0863fbaeed7fccdf641d3bf 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-2020, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -43,7 +43,6 @@
 int
 rela(void)
 {
-    struct natstr *natp;
     struct natstr *np;
     natid cn;
     natid as;
@@ -56,7 +55,6 @@ rela(void)
            return RET_SYN;
        as = (natid)n;
     }
-    natp = getnatp(as);
     pr("\t%s Diplomatic Relations Report\t", cname(as));
     prdate();
     pr("\n  Formal Relations         %5s      theirs\n",
@@ -69,13 +67,15 @@ rela(void)
        if (np->nat_stat < STAT_SANCT)
            continue;
        if (opt_HIDDEN) {
-           if (!player->god && !getcontact(natp, cn))
+           if (!player->god && !in_contact(as, cn))
                continue;
-           if (!player->god && !getcontact(getnatp(player->cnum), cn))
+           if (!player->god && !in_contact(player->cnum, cn))
                continue;
        }
        pr("%3d) %-20.20s  ", cn, cname(cn));
-       pr("%-10s %s\n", relatename(natp, cn), relatename(np, as));
+       pr("%-10s %s\n",
+          relations_string(relations_with(as, cn)),
+          relations_string(relations_with(cn, as)));
     }
     return RET_OK;
 }