]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/servers.h
Moved to Dev-C++ as an editor for project (more stable than gvim!)
[user/henk/code/inspircd.git] / include / servers.h
1 /*
2
3
4 */
5
6 #include "inspircd_config.h" 
7 #include "connection.h"
8 #include <string>
9 #include <map.h>
10  
11 #ifndef __SERVERS_H__ 
12 #define __SERVERS_H__ 
13  
14 #define LINK_ACTIVE     1
15 #define LINK_INACTIVE   0
16
17 class serverrec : public connection
18 {
19  private:
20         map<string, serverrec*> leaf; // list of child servers (leaves)
21  public:
22         char name[MAXBUF];      // server name
23         int pingtime;           // last ping response (ms)
24         int linktype;           // link type, LINK_ACTIVE or LINK_INACTIVE
25         time_t lastping;        // time the link was last pinged
26         long usercount_i;       // invisible users on server
27         long usercount;         // non-invisible users on server
28         long opercount;         // opers on server
29         time_t connected_at;    // time server was connected into the network
30         time_t hops_away;       // number of hops away (for quick access)
31         long version;           // ircd version
32         bool jupiter;           // is a JUPE server (faked to enforce a server ban)
33
34         serverrec();
35         serverrec(char* n, int link_t,  long ver, bool jupe);
36         ~serverrec();
37         void AddLeaf(serverrec *child);
38         void DelLeaf(string n);
39 };
40
41
42
43 typedef map<string, serverrec*> server_list;
44
45 #endif
46