From: Markus Armbruster Date: Thu, 9 Jun 2005 22:28:54 +0000 (+0000) Subject: (sendmessage): Skip players not in state PS_PLAYING. Flashes to them X-Git-Tag: v4.2.21~66 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=e6ef2545bd22af53eb9a8ec856c770b80b81f62d (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. --- 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)))