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

servers.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
00002  *       | Inspire Internet Relay Chat Daemon |
00003  *       +------------------------------------+
00004  *
00005  *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
00006  *                       E-mail:
00007  *                <brain@chatspike.net>
00008  *                <Craig@chatspike.net>
00009  *     
00010  * Written by Craig Edwards, Craig McLure, and others.
00011  * This program is free but copyrighted software; see
00012  *            the file COPYING for details.
00013  *
00014  * ---------------------------------------------------
00015  */
00016 
00017 #include "inspircd_config.h" 
00018 #include "connection.h"
00019 #include <string>
00020 #include <map>
00021  
00022 #ifndef __SERVERS_H__ 
00023 #define __SERVERS_H__ 
00024  
00025 #define LINK_ACTIVE     1
00026 #define LINK_INACTIVE   0
00027 
00030 class serverrec : public connection
00031 {
00032  private:
00033  public:
00036         char name[MAXBUF];
00039         long pingtime;
00042         long usercount_i;
00045         long usercount;
00048         long opercount;
00051         int hops_away;
00054         long version;
00057         bool jupiter;
00058         
00061         char description[MAXBUF];
00062 
00065         char nickserv[NICKMAX];
00066         
00067         bool sync_soon;
00068 
00071         serverrec();
00074         serverrec(char* n, long ver, bool jupe);
00077         ~serverrec();
00078 
00081         std::vector<ircd_connector> connectors;
00082 
00083 
00086         bool CreateListener(char* host, int p);
00087 
00090         bool BeginLink(char* targethost, int port, char* password, char* servername, int myport);
00091 
00094         bool MeshCookie(char* targethost, int port, unsigned long cookie, char* servername);
00095 
00098         void TerminateLink(char* targethost);
00099 
00103         bool SendPacket(char *message, const char* host);
00104 
00109         bool RecvPacket(std::deque<std::string> &messages, char* host, std::deque<std::string> &sums);
00110 
00113         ircd_connector* FindHost(std::string host);
00114 
00118         bool AddIncoming(int fd,char* targethost, int sourceport);      
00119 
00122         void FlushWriteBuffers();
00123 };
00124 
00125 #endif
00126 

Generated on Mon May 30 05:15:21 2005 for InspIRCd by doxygen 1.3.3