From 5983fa2f6cc8c3c7be1149c82c732ceaa4952292 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 31 Oct 2016 11:31:10 +0100 Subject: [PATCH] accept: Fix rejection check for divine senders Communications from deities can't be rejected, but the accept command fails to consider that detail. Should not normally matter, because the reject command doesn't let you reject deities. Fix it anyway. Signed-off-by: Markus Armbruster --- src/lib/commands/acce.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/commands/acce.c b/src/lib/commands/acce.c index 3395386f1..e15aa23a8 100644 --- a/src/lib/commands/acce.c +++ b/src/lib/commands/acce.c @@ -81,9 +81,10 @@ pr_accept(struct natstr *to, natid from) { static char *yes_no[] = { "YES", " NO" }; int rej = getrejects(from, to); + int from_deity = getnatp(from)->nat_stat == STAT_GOD; pr(" %s %s %s", - yes_no[(rej & REJ_TELE) != 0], - yes_no[(rej & REJ_ANNO) != 0], - yes_no[(rej & REJ_LOAN) != 0]); + yes_no[!from_deity && (rej & REJ_TELE)], + yes_no[!from_deity && (rej & REJ_ANNO)], + yes_no[!from_deity && (rej & REJ_LOAN)]); } -- 2.43.0