]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/pr.c
Fix journalling of output ids
[empserver] / src / lib / subs / pr.c
index 68c2bbc499b345aa0d3f31e35ecfa0a3bc9fb6fc..358bdc1f25c28b3b8d71d6bee63196f122b1a62f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -56,6 +56,7 @@
 #include "com.h"
 #include "empio.h"
 #include "file.h"
+#include "journal.h"
 #include "misc.h"
 #include "nat.h"
 #include "player.h"
@@ -124,6 +125,7 @@ pr_id(struct player *p, int id, char *format, ...)
 
     if (p->curid >= 0) {
        io_puts(p->iop, "\n");
+       journal_output(p, p->curid, "\n");
        p->curid = -1;
     }
     va_start(ap, format);
@@ -242,6 +244,8 @@ pr_player(struct player *pl, int id, char *buf)
        }
     }
 
+    journal_output(pl, id, buf);
+
     if (player == pl) {
        while (io_output_if_queue_long(pl->iop,
                        pl->may_sleep == PLAYER_SLEEP_FREELY) > 0)
@@ -298,6 +302,8 @@ upr_player(struct player *pl, int id, char *buf)
        }
     }
 
+    journal_output(pl, id, buf);
+
     if (player == pl) {
        while (io_output_if_queue_long(pl->iop,
                        pl->may_sleep == PLAYER_SLEEP_FREELY) > 0)