]> git.pond.sub.org Git - empserver/commitdiff
accept: Fix rejection check for divine senders
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 31 Oct 2016 10:31:10 +0000 (11:31 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:21 +0000 (20:09 +0200)
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 <armbru@pond.sub.org>
src/lib/commands/acce.c

index 3395386f1611c3a1594534c2850c29afce9f3907..e15aa23a8a5daf5766f43ae94ea11c8fef5b9fb2 100644 (file)
@@ -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)]);
 }