summaryrefslogtreecommitdiff
path: root/include/servers.h
blob: e62f4d3faeefc832640b83bc43a535a2a1f908f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*

$Log$
Revision 1.1  2003/01/26 20:15:00  brain
Added server classes for linking


*/

#include "inspircd_config.h" 
#include <string>
 
#ifndef __SERVERS_H__ 
#define __SERVERS_H__ 
 
#define LINK_ACTIVE	1
#define LINK_INACTIVE	0

typedef vector<serverrec*> server_list;

class serverrec
{
 private:
	server_list leaf; // list of child servers (leaves)
 public:
	char name[MAXBUF]; 	// server name
	int pingtime;		// last ping response (ms)
	int linktype;		// link type, LINK_ACTIVE or LINK_INACTIVE
	time_t lastping;	// time the link was last pinged
	long usercount_i;	// invisible users on server
	long usercount;		// non-invisible users on server
	long opercount;		// opers on server
	time_t connected_at;	// time server was connected into the network
	time_t hops_away;	// number of hops away (for quick access)
	long version;		// ircd version
	bool jupiter;		// is a JUPE server (faked to enforce a server ban)

	serverrec();
	serverrec(char* n, int link_t,  long ver, bool jupe);
	~serverrec()
	void AddLeaf(serverrec *child);
	void DelLeaf(char* n);
};


#endif