]> git.pond.sub.org Git - empserver/blobdiff - include/nat.h
Update copyright notice
[empserver] / include / nat.h
index 58421b5b7f4e2d2031e4ed887300487fdec9243d..6808f62474b226c2ff6782ab49215491635b45d6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,7 @@
  *  ---
  *
  *  nat.h: Definitions for things having to do with nations
- * 
+ *
  *  Known contributors to this file:
  *     Thomas Ruschak
  *     Ken Stevens, 1995
@@ -70,18 +70,21 @@ struct realmstr {
     /* initial part must match struct empobj */
     short ef_type;
     short r_uid;               /* realm table index */
+    unsigned r_seqno;
+    time_t r_timestamp;                /* Last time this realm was touched */
     natid r_cnum;              /* country number */
     /* end of part matching struct empobj */
     unsigned short r_realm;    /* realm number */
-    short r_xl, r_xh;          /* horizontal bounds */
-    short r_yl, r_yh;          /* vertical bounds */
-    time_t r_timestamp;        /* Last time this realm was touched */
+    coord r_xl, r_xh;          /* horizontal bounds */
+    coord r_yl, r_yh;          /* vertical bounds */
 };
 
 struct natstr {
     /* initial part must match struct empobj */
     short ef_type;
     short nat_uid;             /* equals nat_cnum */
+    unsigned nat_seqno;
+    time_t nat_timestamp;
     natid nat_cnum;            /* our country number */
     /* end of part matching struct empobj */
     enum nat_status nat_stat;
@@ -92,11 +95,10 @@ struct natstr {
     char nat_userid[32];       /* userid of last user, may be empty */
     coord nat_xcap, nat_ycap;  /* cap location in abs coords */
     coord nat_xorg, nat_yorg;  /* origin location in abs coords */
-    signed char nat_dayno;     /* day of the year mod 128 */
     signed char nat_update;    /* Want an update or not. */
     unsigned short nat_tgms;   /* # of telegrams to be announced */
     unsigned short nat_ann;    /* # of annos pending */
-    unsigned short nat_minused;        /* number of minutes used today */
+    int nat_timeused;          /* number of seconds used today */
     short nat_btu;             /* bureaucratic time units */
     short nat_access;          /* The tick when BTUs were last updated */
     long nat_reserve;          /* military reserves */
@@ -175,13 +177,14 @@ extern void agecontact(struct natstr *np);
 extern int influx(struct natstr *np);
 
 extern struct natstr *nat_reset(struct natstr *, enum nat_status, coord, coord);
+extern int check_nat_name(char *cname);
 
 extern int grant_btus(struct natstr *, int );
 
 /* nation flags */
-#define NF_INFORM      bit(0)  /* Inform me of telegrams right away */
-#define NF_FLASH       bit(1)  /* Allow other players to flash me (sicko :) */
-#define NF_BEEP        bit(2)  /* Make beeping sounds when appropriate */
+#define NF_INFORM      bit(0)  /* Inform me of telegrams right away */
+#define NF_FLASH       bit(1)  /* Allow other players to flash me (sicko :) */
+#define NF_BEEP                bit(2)  /* Make beeping sounds when appropriate */
 #define NF_COASTWATCH  bit(3)  /* Turn auto-coastwatch on */
 #define NF_SONAR       bit(4)  /* Turn auto-sonar on */
 #define NF_TECHLISTS    bit(5) /* Sort lists by tech not type */