New server.h for server startup, control and shutdown, i.e. stuff in
src/server. Use it.
This commit is contained in:
parent
8115388a58
commit
22a356b1e1
19 changed files with 73 additions and 24 deletions
|
@ -36,13 +36,11 @@
|
|||
#include "player.h"
|
||||
#include "empthread.h"
|
||||
#include "commands.h"
|
||||
#include "server.h"
|
||||
|
||||
int
|
||||
force(void)
|
||||
{
|
||||
extern empth_sem_t *update_sem;
|
||||
extern int update_pending;
|
||||
extern int shutdown_pending;
|
||||
int seconds;
|
||||
time_t now;
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "file.h"
|
||||
#include "commands.h"
|
||||
#include "optlist.h"
|
||||
#include "server.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -52,7 +53,6 @@ mobupdate(void)
|
|||
{
|
||||
FILE *fp;
|
||||
long minites;
|
||||
extern int updating_mob;
|
||||
struct mob_acc_globals timestamps;
|
||||
long now;
|
||||
|
||||
|
|
|
@ -38,13 +38,12 @@
|
|||
#include "nat.h"
|
||||
#include "file.h"
|
||||
#include "commands.h"
|
||||
#include "server.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
int
|
||||
shut(void)
|
||||
{
|
||||
extern int update_pending;
|
||||
extern int shutdown_pending;
|
||||
int shutdown_minutes;
|
||||
int shutdown_was_pending;
|
||||
s_char buf[100];
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "optlist.h"
|
||||
#include "keyword.h"
|
||||
#include "wantupd.h"
|
||||
#include "server.h"
|
||||
|
||||
/*
|
||||
* Tell what the update policy is, and when the next update
|
||||
|
@ -49,7 +50,6 @@ upda(void)
|
|||
{
|
||||
FILE *fp;
|
||||
struct mob_acc_globals timestamps;
|
||||
extern int updating_mob;
|
||||
|
||||
if (opt_MOB_ACCESS) {
|
||||
#if !defined(_WIN32)
|
||||
|
@ -73,7 +73,6 @@ upda(void)
|
|||
}
|
||||
if (opt_UPDATESCHED) {
|
||||
time_t now, next, delta;
|
||||
extern int update_time;
|
||||
|
||||
if (updates_disabled())
|
||||
pr("UPDATES ARE DISABLED!\n");
|
||||
|
|
|
@ -58,11 +58,11 @@
|
|||
#include "empthread.h"
|
||||
#include "commands.h"
|
||||
#include "optlist.h"
|
||||
#include "server.h"
|
||||
|
||||
int
|
||||
zdon(void)
|
||||
{
|
||||
extern empth_sem_t *update_sem;
|
||||
natid whichcnum;
|
||||
struct natstr *natp;
|
||||
register s_char *p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue