From d2057af7a23c202ffa28ad1f52c09c3b7c49c9d9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 6 Nov 2011 19:13:59 +0100 Subject: [PATCH] Make add refuse to touch a country while it's being played I suspect player code could get terminally confused by country state changing unexpectedly. Not worth the risk. --- src/lib/commands/add.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/commands/add.c b/src/lib/commands/add.c index 5956902c4..5580a9032 100644 --- a/src/lib/commands/add.c +++ b/src/lib/commands/add.c @@ -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; -- 2.43.0