]> git.pond.sub.org Git - empserver/blobdiff - src/lib/player/recvclient.c
Update copyright notice
[empserver] / src / lib / player / recvclient.c
index b89bbef66c4b8c4e948fe909519f254fdd06b449..02acda207c190bb2296dbb72b77139555810e37f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
  *
  *  Known contributors to this file:
  *     Dave Pare, 1986
- *     Markus Armbruster, 2006-2012
+ *     Markus Armbruster, 2006-2015
  *     Ron Koenderink, 2009
  */
 
 #include <config.h>
 
 #include "empio.h"
+#include "file.h"
 #include "journal.h"
 #include "player.h"
 #include "prototypes.h"
@@ -43,7 +44,7 @@
  * Receive a line of input from the current player.
  * If the player's aborted flag is set, return -1 without receiving
  * input.
- * Else receive one line and store it in CMD[SIZE].
+ * Else receive one line and store it in @cmd[@size].
  * This may block for input, yielding the processor.  Flush buffered
  * output when blocking, to make sure player sees the prompt.
  * If the player's connection has the I/O error or EOF indicator set,
@@ -68,6 +69,8 @@ recvclient(char *cmd, int size)
        count = io_gets(player->iop, cmd, size);
        if (count >= 0) {
            /* got it */
+           if (player_io_deadline(player, 0))
+               ef_make_stale();
            if (strcmp(cmd, "ctld") == 0)
                player->aborted = player->got_ctld = 1;
            if (strcmp(cmd, "aborted") == 0)