]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/coun.c
Use relations_with() for US==THEM || getrel(NP, THEM)
[empserver] / src / lib / commands / coun.c
index 24be3468546d48b22c12635c2fe55f95933e21dc..c6a3fe8deb563785ef6781c7e26e436c144464f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, 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
@@ -26,9 +26,9 @@
  *  ---
  *
  *  coun.c: Do a country roster
- * 
+ *
  *  Known contributors to this file:
- *     
+ *
  */
 
 #include <config.h>
@@ -44,7 +44,7 @@ coun(void)
     struct nstr_item ni;
     struct natstr nat;
 
-    if (!snxtitem(&ni, EF_NATION, player->argp[1]))
+    if (!snxtitem(&ni, EF_NATION, player->argp[1], NULL))
        return RET_SYN;
     prdate();
     pr("  #   last access                         %sstatus     country name\n",
@@ -68,8 +68,8 @@ coun_list(struct natstr *natp)
     if (getplayer(cn)
        && (player->god
            || natp->nat_stat == STAT_GOD
-           || cn == player->cnum || getrel(natp, player->cnum) == ALLIED))
-        pr(" Now logged on                     ");
+           || relations_with(cn, player->cnum) == ALLIED))
+       pr(" Now logged on                     ");
     else if (player->god) {
        if (natp->nat_last_login == 0)
            pr(" Never logged on                   ");