00001 /* 00002 00003 $Log$ 00003 Revision 1.5 2003/01/27 00:28:57 brain 00003 ... 00003 00004 Revision 1.3 2003/01/27 00:22:53 brain 00005 Modified documentation 00006 Moved some classes below base class 00007 00008 Revision 1.2 2003/01/26 23:52:59 brain 00009 Modified documentation for base classes 00010 Added base classes 00011 00012 Revision 1.1.1.1 2003/01/23 19:45:58 brain 00013 InspIRCd second source tree 00014 00015 Revision 1.9 2003/01/22 00:44:26 brain 00016 Added documentation comments 00017 00018 Revision 1.8 2003/01/21 21:11:17 brain 00019 Added documentation 00020 00021 Revision 1.7 2003/01/17 13:21:38 brain 00022 Added CONNECT ALLOW and CONNECT DENY config tags 00023 Added PASS command 00024 00025 Revision 1.6 2003/01/17 10:37:55 brain 00026 Added /INVITE command and relevent structures 00027 00028 Revision 1.5 2003/01/16 20:11:56 brain 00029 fixed some ugly pointer bugs (thanks dblack and a|KK|y!) 00030 00031 Revision 1.4 2003/01/15 22:47:44 brain 00032 Changed user and channel structs to classes (finally) 00033 00034 Revision 1.3 2003/01/14 21:14:30 brain 00035 added /ISON command (for mIRC etc basic notify) 00036 00037 00038 */ 00039 00040 #include "inspircd_config.h" 00041 #include "channels.h" 00042 #include "connection.h" 00043 00044 #include <string> 00045 00046 #ifndef __USERS_H__ 00047 #define __USERS_H__ 00048 00049 #define STATUS_OP 4 00050 #define STATUS_HOP 2 00051 #define STATUS_VOICE 1 00052 #define STATUS_NORMAL 0 00053 00054 #define CC_ALLOW 0 00055 #define CC_DENY 1 00056 00059 class Invited : public classbase 00060 { 00061 public: 00062 char channel[CHANMAX]; 00063 }; 00064 00065 00068 class ConnectClass : public classbase 00069 { 00070 public: 00071 int type; 00072 char host[MAXBUF]; 00073 char pass[MAXBUF]; 00074 }; 00075 00078 typedef vector<Invited> InvitedList; 00079 00080 00081 00084 typedef vector<ConnectClass> ClassVector; 00085 00092 class userrec : public connection 00093 { 00094 private: 00095 00098 InvitedList invites; 00099 public: 00100 00105 char nick[NICKMAX]; 00106 00109 char ident[64]; 00110 00114 char dhost[256]; 00115 00118 char fullname[128]; 00119 00124 char modes[32]; 00125 00126 ucrec chans[MAXCHANS]; 00127 00130 char server[256]; 00131 00135 char awaymsg[512]; 00136 00140 char result[256]; 00141 00142 userrec(); 00143 00144 virtual ~userrec() { } 00145 00150 virtual char* GetFullHost(); 00151 00157 virtual char* GetFullRealHost(); 00158 00161 virtual bool IsInvited(char* channel); 00162 00165 virtual void InviteTo(char* channel); 00166 00171 virtual void RemoveInvite(char* channel); 00172 00173 }; 00174 00175 00176 #endif