Planeshift
serverstatus.h
Go to the documentation of this file.
1 /*
2  * serverstatus.h by Matze Braun <matze@braunis.de>
3  *
4  * Copyright (C) 2001 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 #ifndef __SERVERSTATUS_H__
20 #define __SERVERSTATUS_H__
21 //=============================================================================
22 // Crystal Space Includes
23 //=============================================================================
24 #include <iutil/vfs.h>
25 #include <csutil/threading/thread.h>
26 #include <csutil/csstring.h>
27 
28 //=============================================================================
29 // Project Includes
30 //=============================================================================
31 
32 //=============================================================================
33 // Local Includes
34 //=============================================================================
35 
36 
37 
38 #ifdef USE_WINSOCK
39 # include "net/sockwin.h"
40 #endif
41 #ifdef USE_UNISOCK
42 # include "net/sockuni.h"
43 #endif
44 
45 struct iObjectRegistry;
46 class psServer;
47 
65 {
66 public:
68  static bool Initialize(iObjectRegistry* objreg);
69 
71  static void ScheduleNextRun();
72 
74  static csTicks reportRate;
75 
77  static csString reportFile;
78 
79  static unsigned int count;
80 
81  static unsigned int mob_deathcount;
82  static unsigned int mob_birthcount;
83  static unsigned int player_deathcount;
84 
85  static unsigned int sold_items;
86  static unsigned int sold_value;
87 };
88 
89 #endif
90 
static unsigned int mob_birthcount
Definition: serverstatus.h:82
static unsigned int sold_value
Definition: serverstatus.h:86
static unsigned int player_deathcount
Definition: serverstatus.h:83
static csTicks reportRate
Interval in milliseconds to generate a report file.
Definition: serverstatus.h:74
static unsigned int count
Definition: serverstatus.h:79
static unsigned int mob_deathcount
Definition: serverstatus.h:81
This class generates logs at a particular interval that has information that can be displayed later o...
Definition: serverstatus.h:64
The main server class.
Definition: psserver.h:102
static void ScheduleNextRun()
Has the generator run in a while.
static unsigned int sold_items
Definition: serverstatus.h:85
static bool Initialize(iObjectRegistry *objreg)
Reads config files, starts periodical status generator.
static csString reportFile
File that it should log to.
Definition: serverstatus.h:77