]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/flash.c
Use relations_with() for US==THEM || getrel(NP, THEM)
[empserver] / src / lib / commands / flash.c
index ffdba7a517a733d7a2c2a6a0d7db8ea10e1a5b42..87c244a89ee4df26b2857fd76631629a23996818 100644 (file)
@@ -63,8 +63,8 @@ flash(void)
        }
     } else {
        /* Ok, we are a normal country, can we flash them? */
-       if (to->nat_stat != STAT_GOD && tocn != player->cnum
-           && getrel(to, player->cnum) < FRIENDLY) {
+       if (to->nat_stat != STAT_GOD
+           && relations_with(tocn, player->cnum) < FRIENDLY) {
            pr("%s is not a deity or friendly with us.\n", to->nat_cnam);
            return RET_SYN;
        }
@@ -166,8 +166,8 @@ sendmessage(struct natstr *to, char *message, int verbose)
 
     if (to) {
        /* flash */
-       if (player->god || to->nat_cnum == player->cnum
-           || getrel(to, player->cnum) == ALLIED) {
+       if (player->god
+           || relations_with(to->nat_cnum, player->cnum) == ALLIED) {
            /* Can see TO logged in anyway, so it's okay to tell */
            if (rejected)
                pr("%s is not accepting flashes\n", to->nat_cnam);