From c7cdcfc9734b088677b7fba1e0b1e525c97ed79a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 31 Oct 2016 11:18:02 +0100 Subject: [PATCH] reject: Clean up typed_wu()'s check for deity When sending a telegram, typed_wu() checks whether the recipient is rejecting telegrams. The check tacitly assumes from == player->cnum. Happens to be the case, but clean it up anyway. Signed-off-by: Markus Armbruster --- src/lib/subs/wu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/subs/wu.c b/src/lib/subs/wu.c index e4a6d785d..d97b3c9f0 100644 --- a/src/lib/subs/wu.c +++ b/src/lib/subs/wu.c @@ -28,7 +28,7 @@ * * Known contributors to this file: * Steve McClure, 2000 - * Markus Armbruster, 2005-2015 + * Markus Armbruster, 2005-2016 */ #include @@ -40,7 +40,6 @@ #include "misc.h" #include "nat.h" #include "optlist.h" -#include "player.h" #include "prototypes.h" #include "tel.h" #include "update.h" @@ -154,7 +153,8 @@ typed_wu(natid from, natid to, char *message, int type) for (to = 0; NULL != (np = getnatp(to)); to++) { if (np->nat_stat < STAT_SANCT) continue; - if (!player->god && (getrejects(from, np) & REJ_ANNO)) + if (getnatp(from)->nat_stat != STAT_GOD + && (getrejects(from, np) & REJ_ANNO)) continue; if (!np->nat_ann || !tel.tel_cont) { np->nat_ann++; -- 2.43.0