/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
*
* ---
*
- * See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- * related information and legal notices. It is expected that any future
- * projects/authors will amend these files as needed.
+ * See files README, COPYING and CREDITS in the root of the source
+ * tree for related information and legal notices. It is expected
+ * that future projects/authors will amend these files as needed.
*
* ---
*
*
*/
+#include <config.h>
+
#include "prototypes.h"
#include <string.h>
#include "misc.h"
}
if (!gamehours(player->curup)) {
pr("Empire hours restriction in force\n");
- if ((natp->nat_stat & STAT_GOD) == 0)
+ if (natp->nat_stat != STAT_GOD)
return;
}
daychange(player->curup);
pr("Time exceeded today\n");
return;
}
- if (natp->nat_stat != VIS
+ if (natp->nat_stat != STAT_VIS
&& natp->nat_last_login
&& (strcmp(natp->nat_hostaddr, player->hostaddr)
|| strcmp(natp->nat_userid, player->userid))) {
* charging at least 15 seconds.
*/
time(&natp->nat_last_logout);
- secs = max(natp->nat_last_logout - player->lasttime, 15);
+ secs = MAX(natp->nat_last_logout - player->lasttime, 15);
natp->nat_minused += secs / 60;
secs = secs % 60;
if (chance(secs / 60.0))
putnat(natp);
return 0;
}
- player->visitor = (natp->nat_stat & (STAT_NORM | STAT_GOD)) == 0;
+ player->visitor = natp->nat_stat < STAT_SANCT;
if (player->dolcost != 0.0) {
if (player->dolcost > 100.0)
pr("That just cost you $%.2f\n", player->dolcost);
else
player->nstat |= CAP;
player->ncomstat = player->nstat;
+ if (player->god)
+ player->ncomstat |= CAP | MONEY;
time(&player->curup);
minute = (player->curup - player->lasttime) / 60;
if (minute > 0) {
daychange(player->curup);
if (!gamehours(player->curup)) {
pr("Empire hours restriction in force\n");
- if ((natp->nat_stat & STAT_GOD) == 0) {
+ if (natp->nat_stat != STAT_GOD) {
putnat(natp);
return 0;
}
player->lasttime += minute * 60;
natp->nat_minused += minute;
}
- if ((player->nstat & NORM) && natp->nat_minused > m_m_p_d) {
+ if (natp->nat_stat == STAT_ACTIVE && natp->nat_minused > m_m_p_d) {
pr("Max minutes per day limit exceeded.\n");
player->ncomstat = VIS;
}