]> git.pond.sub.org Git - empserver/blobdiff - src/lib/player/player.c
Update copyright notice
[empserver] / src / lib / player / player.c
index 00059368523d348e7a9ebfe3a24c7023da12ec0f..6108b264243f1dd9a34ae0fe216329b17da5eb2c 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-2016, 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:
  *     Steve McClure, 2000
- *     Markus Armbruster, 2004-2012
+ *     Markus Armbruster, 2004-2014
  *     Ron Koenderink, 2004-2009
  */
 
 #include <config.h>
 
+#include "chance.h"
 #include "empio.h"
 #include "empthread.h"
 #include "file.h"
@@ -59,6 +60,10 @@ player_main(struct player *p)
     time(&player->curup);
     update_timeused_login(player->curup);
     show_motd();
+    if (running_test_suite)
+       pr("\n"
+          "***          Server configured for testing          ***\n"
+          "*** If you see this in a game, it is misconfigured! ***\n");
     if (init_nats() < 0) {
        pr("Server confused, try again later\n");
        return;
@@ -75,11 +80,9 @@ player_main(struct player *p)
           natp->nat_last_login <= natp->nat_last_logout
           ? ctime(&natp->nat_last_logout) : "?");
        pr("                  by: %s@%s\n",
-          natp->nat_userid,
-          *natp->nat_hostname ? natp->nat_hostname : natp->nat_hostaddr);
+          natp->nat_userid, natp->nat_hostaddr);
     }
     strcpy(natp->nat_userid, player->userid);
-    strcpy(natp->nat_hostname, player->hostname);
     strcpy(natp->nat_hostaddr, player->hostaddr);
     natp->nat_last_login = player->curup;
     putnat(natp);
@@ -199,7 +202,7 @@ status(void)
 }
 
 /*
- * Make all objects stale if ARG is one of the player's command arguments.
+ * Make all objects stale if @arg is one of the player's command arguments.
  * See ef_make_stale() for what "making stale" means.
  * Useful for functions that prompt for missing arguments.
  * These can yield the processor, so we'd like to call ef_make_stale()
@@ -284,6 +287,5 @@ quit(void)
 char *
 praddr(struct player *p)
 {
-    return prbuf("%s@%s", p->userid,
-                *p->hostname ? p->hostname : p->hostaddr);
+    return prbuf("%s@%s", p->userid, p->hostaddr);
 }