]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/add.c
Make add refuse to touch a country while it's being played
[empserver] / src / lib / commands / add.c
index 5956902c4ec437a7418c4d682ed13f40032b099d..5580a903246386ab6c4709d5d995527040687888 100644 (file)
@@ -108,6 +108,11 @@ add(void)
        pr("Illegal status\n");
        return RET_SYN;
     }
+    if (getplayer(natp->nat_cnum)) {
+       pr("%s (#%d) is logged in!\n",
+          natp->nat_cnam, natp->nat_cnum);
+       return RET_FAIL;
+    }
     nat_reset(natp, natp->nat_cnum, cntryname, pname, stat);
     putnat(natp);
     return 0;