From e6ef2545bd22af53eb9a8ec856c770b80b81f62d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 9 Jun 2005 22:28:54 +0000 Subject: [PATCH] (sendmessage): Skip players not in state PS_PLAYING. Flashes to them get ignored, hence telling the player that the flash was sent is wrong. Skipping fixes that. --- src/lib/commands/flash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/commands/flash.c b/src/lib/commands/flash.c index 5043e6749..2f31d3371 100644 --- a/src/lib/commands/flash.c +++ b/src/lib/commands/flash.c @@ -151,6 +151,8 @@ sendmessage(struct natstr *us, struct natstr *to, char *message time(&now); tm = localtime(&now); for (other = player_next(0); other != 0; other = player_next(other)) { + if (other->state != PS_PLAYING) + continue; if (to && other->cnum != to->nat_cnum) continue; if (!(wto = getnatp(other->cnum))) -- 2.43.0