Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

serverrec Class Reference

#include <servers.h>

Inheritance diagram for serverrec:

connection classbase List of all members.

Public Methods

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

Public Attributes

char name [MAXBUF]
int pingtime
int linktype
time_t lastping
long usercount_i
long usercount
long opercount
time_t connected_at
time_t hops_away
long version
bool jupiter

Private Attributes

map< string, serverrec * > leaf

Constructor & Destructor Documentation

serverrec::serverrec  
 

Definition at line 16 of file servers.cpp.

References connected_at, connection::fd, hops_away, jupiter, lastping, leaf, LINK_ACTIVE, linktype, opercount, pingtime, usercount, usercount_i, and version.

00017 {
00018         leaf.clear();
00019         strcpy(name,"");
00020         pingtime = 0;
00021         linktype = LINK_ACTIVE;
00022         lastping = time(NULL);
00023         usercount_i = usercount = opercount = version = 0;
00024         hops_away = 1;
00025         connected_at = time(NULL);
00026         jupiter = false;
00027         fd = 0;
00028 }

serverrec::serverrec char *    n,
int    link_t,
long    ver,
bool    jupe
 

Definition at line 35 of file servers.cpp.

References connected_at, connection::fd, hops_away, jupiter, lastping, leaf, linktype, opercount, usercount, usercount_i, and version.

00036 {
00037         leaf.clear();
00038         strcpy(name,n);
00039         linktype = link_t;
00040         lastping = time(NULL);
00041         usercount_i = usercount = opercount = 0;
00042         version = ver;
00043         hops_away = 1;
00044         connected_at = time(NULL);
00045         jupiter = jupe;
00046         fd = 0;
00047 }

serverrec::~serverrec  
 

Definition at line 31 of file servers.cpp.

00032 {
00033 }


Member Function Documentation

void serverrec::AddLeaf serverrec *    child
 

Definition at line 49 of file servers.cpp.

References leaf, and name.

00050 {
00051         leaf[child->name] = child;
00052 }

void serverrec::DelLeaf string    n
 

Definition at line 54 of file servers.cpp.

References leaf.

00055 {
00056         server_list::iterator i = leaf.find(n);
00057 
00058         if (i != leaf.end())
00059                 leaf.erase(i);
00060 }


Member Data Documentation

time_t serverrec::connected_at
 

Definition at line 33 of file servers.h.

Referenced by serverrec().

time_t serverrec::hops_away
 

Definition at line 34 of file servers.h.

Referenced by serverrec().

bool serverrec::jupiter
 

Definition at line 36 of file servers.h.

Referenced by serverrec().

time_t serverrec::lastping
 

Reimplemented from connection.

Definition at line 29 of file servers.h.

Referenced by serverrec().

map<string, serverrec*> serverrec::leaf [private]
 

Definition at line 24 of file servers.h.

Referenced by AddLeaf(), DelLeaf(), and serverrec().

int serverrec::linktype
 

Definition at line 28 of file servers.h.

Referenced by serverrec().

char serverrec::name[MAXBUF]
 

Definition at line 26 of file servers.h.

Referenced by AddLeaf().

long serverrec::opercount
 

Definition at line 32 of file servers.h.

Referenced by serverrec().

int serverrec::pingtime
 

Definition at line 27 of file servers.h.

Referenced by serverrec().

long serverrec::usercount
 

Definition at line 31 of file servers.h.

Referenced by serverrec().

long serverrec::usercount_i
 

Definition at line 30 of file servers.h.

Referenced by serverrec().

long serverrec::version
 

Definition at line 35 of file servers.h.

Referenced by serverrec().


The documentation for this class was generated from the following files:
Generated on Sun Jan 26 23:45:50 2003 for InspIRCd by doxygen1.3-rc2