]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/add.c
Update copyright notice
[empserver] / src / lib / commands / add.c
index 5580a903246386ab6c4709d5d995527040687888..39fbf5e2b644445700aba0f575cfcf0e22aa18ec 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2012, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -108,6 +108,16 @@ add(void)
        pr("Illegal status\n");
        return RET_SYN;
     }
+    if (stat == STAT_UNUSED
+       ? natp->nat_stat >= STAT_SANCT : natp->nat_stat != STAT_UNUSED) {
+       pr("Country %s (#%d) status is %s.\n"
+          "%s it in this state is normally a bad idea.",
+          natp->nat_cnam, natp->nat_cnum,
+          symbol_by_value(natp->nat_stat, nation_status),
+          stat == STAT_UNUSED ? "Deleting" : "Replacing");
+       if (!askyn("Are you sure? "))
+           return RET_FAIL;
+    }
     if (getplayer(natp->nat_cnum)) {
        pr("%s (#%d) is logged in!\n",
           natp->nat_cnam, natp->nat_cnum);