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

users.h

Go to the documentation of this file.
00001 /*
00002 
00003 $Log$
00003 Revision 1.2  2003/01/23 20:38:00  brain
00003 Updated documentation scripts
00003 
00004 Revision 1.1.1.1  2003/01/23 19:45:58  brain
00005 InspIRCd second source tree
00006 
00007 Revision 1.9  2003/01/22 00:44:26  brain
00008 Added documentation comments
00009 
00010 Revision 1.8  2003/01/21 21:11:17  brain
00011 Added documentation
00012 
00013 Revision 1.7  2003/01/17 13:21:38  brain
00014 Added CONNECT ALLOW and CONNECT DENY config tags
00015 Added PASS command
00016 
00017 Revision 1.6  2003/01/17 10:37:55  brain
00018 Added /INVITE command and relevent structures
00019 
00020 Revision 1.5  2003/01/16 20:11:56  brain
00021 fixed some ugly pointer bugs (thanks dblack and a|KK|y!)
00022 
00023 Revision 1.4  2003/01/15 22:47:44  brain
00024 Changed user and channel structs to classes (finally)
00025 
00026 Revision 1.3  2003/01/14 21:14:30  brain
00027 added /ISON command (for mIRC etc basic notify)
00028 
00029 
00030 */
00031 
00032 #include "inspircd_config.h" 
00033 #include "channels.h"
00034 
00035 #include <string>
00036  
00037 #ifndef __USERS_H__ 
00038 #define __USERS_H__ 
00039  
00040 #define STATUS_OP       4
00041 #define STATUS_HOP      2
00042 #define STATUS_VOICE    1
00043 #define STATUS_NORMAL   0
00044 
00045 #define CC_ALLOW        0
00046 #define CC_DENY         1
00047 
00050 class Invited
00051 {
00052  public:
00053         char channel[CHANMAX];
00054 };
00055 
00056 
00059 class ConnectClass
00060 {
00061  public:
00062         int type;
00063         char host[MAXBUF];
00064         char pass[MAXBUF];
00065 };
00066 
00069 typedef vector<Invited> InvitedList;
00070 
00071 
00072 
00075 typedef vector<ConnectClass> ClassVector;
00076 
00083 class userrec
00084 {
00085  private:
00086 
00089         InvitedList invites;
00090  public:
00091         
00096         char nick[NICKMAX];
00097         
00100         unsigned long ip;
00101 
00104         char ident[64];
00105 
00108         char host[256];
00109         
00113         char dhost[256];
00114         
00117         char fullname[128];
00118         
00123         int fd;
00124         
00129         char modes[32];
00130         
00134         char inbuf[MAXBUF];
00135         
00141         time_t lastping;
00142         
00145         time_t signon;
00146         
00150         time_t idle_lastmsg;
00151         
00156         time_t nping;
00157         
00162         int registered;
00163         
00168         ucrec chans[MAXCHANS];
00169         
00172         char server[256];
00173         
00177         char awaymsg[512];
00178         
00181         int port;
00182         
00186         long bytes_in;
00187         
00191         long bytes_out;
00192         
00196         long cmds_in;
00197         
00201         long cmds_out;
00202         
00206         char result[256];
00207         
00212         bool haspassed;
00213 
00214         userrec();
00215         
00216         virtual ~userrec() {  }
00217         
00222         virtual char* GetFullHost();
00223         
00229         virtual char* GetFullRealHost();
00230         
00233         virtual bool IsInvited(char* channel);
00234         
00237         virtual void InviteTo(char* channel);
00238         
00243         virtual void RemoveInvite(char* channel);
00244         
00245 };
00246 
00247 
00248 #endif

Generated on Thu Jan 23 20:28:58 2003 for InspIRCd by doxygen1.3-rc2