]> git.pond.sub.org Git - empserver/commitdiff
wire: Fix announcement rejection for and from deities
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 31 Oct 2016 09:56:24 +0000 (10:56 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:21 +0000 (20:09 +0200)
Announcement rejection is completely broken for deities.
Additionally, deity announcements aren't exempted from rejection, but
that should not normally matter, because the reject command doesn't
let you reject deities.

Broken when announcements were separated from telegrams in Empire 3.
Fix to test the sender's instead of the player's divinity.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/rea.c

index 57d70413bd7c78f05aeeb92c297dd0e6ee56992c..baa103ee206f820ae27f9c9ae796c75189e6e5b1 100644 (file)
@@ -31,7 +31,7 @@
  *     Doug Hay, 1998
  *     Steve McClure, 1998-2000
  *     Ron Koenderink, 2005-2007
- *     Markus Armbruster, 2009-2011
+ *     Markus Armbruster, 2009-2016
  */
 
 #include <config.h>
@@ -107,7 +107,8 @@ rea(void)
        if (res <= 0)
            break;
        if (*kind == 'a') {
-           if ((!player->god && (getrejects(tgm.tel_from, np) & REJ_ANNO))
+           if ((getnatp(tgm.tel_from)->nat_stat != STAT_GOD
+                && (getrejects(tgm.tel_from, np) & REJ_ANNO))
                || tgm.tel_date < then) {
                res = tel_read_body(telfp, mbox, &tgm, NULL, NULL);
                if (res < 0)