]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/rela.c
commands: Rename the command functions
[empserver] / src / lib / commands / rela.c
index 28802f9008f40af316c15577668999aef938079d..ced60bfc2e42c49fdd758b55ab50f3cf14fbc017 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2012, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -41,9 +41,8 @@
  * viewpoint of another country
  */
 int
-rela(void)
+c_relations(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;
 }