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.7 2003/01/22 00:44:26 brain 00008 Added documentation comments 00009 00010 Revision 1.6 2003/01/21 21:11:17 brain 00011 Added documentation 00012 00013 Revision 1.5 2003/01/16 20:11:55 brain 00014 fixed some ugly pointer bugs (thanks dblack and a|KK|y!) 00015 00016 Revision 1.4 2003/01/15 22:47:44 brain 00017 Changed user and channel structs to classes (finally) 00018 00019 00020 */ 00021 00022 #include "inspircd_config.h" 00023 #include <time.h> 00024 #include <vector> 00025 00026 #ifndef __CHANNELS_H__ 00027 #define __CHANNELS_H__ 00028 00032 class HostItem 00033 { 00034 public: 00035 time_t set_time; 00036 char set_by[NICKMAX]; 00037 char data[MAXBUF]; 00038 00039 HostItem() { /* stub */ } 00040 virtual ~HostItem() { /* stub */ } 00041 }; 00042 00043 // banlist is inherited from HostList mainly for readability 00044 // reasons only 00045 00048 class BanItem : public HostItem 00049 { 00050 }; 00051 00052 // same with this... 00053 00056 class ExemptItem : public HostItem 00057 { 00058 }; 00059 00060 // and this... 00061 00064 class InviteItem : public HostItem 00065 { 00066 }; 00067 00068 00071 typedef vector<BanItem> BanList; 00072 00075 typedef vector<ExemptItem> ExemptList; 00076 00079 typedef vector<InviteItem> InviteList; 00080 00085 class chanrec 00086 { 00087 public: 00090 char name[CHANMAX]; /* channel name */ 00094 char custom_modes[MAXMODES]; /* modes handled by modules */ 00098 char topic[MAXBUF]; 00101 time_t created; 00105 time_t topicset; 00109 char setby[NICKMAX]; 00110 00114 long limit; 00115 00119 char key[32]; 00120 00123 short int topiclock; 00124 00127 short int noexternal; 00128 00131 short int inviteonly; 00132 00135 short int moderated; 00136 00140 short int secret; 00141 00145 short int c_private; 00146 00149 BanList bans; 00150 00153 chanrec() 00154 { 00155 strcpy(name,""); 00156 strcpy(custom_modes,""); 00157 strcpy(topic,""); 00158 strcpy(setby,""); 00159 strcpy(key,""); 00160 created = topicset = limit = 0; 00161 topiclock = noexternal = inviteonly = moderated = secret = c_private = false; 00162 } 00163 00164 virtual ~chanrec() { /* stub */ } 00165 }; 00166 00167 /* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o 00168 * needs to come AFTER struct chanrec */ 00169 00170 #define UCMODE_OP 1 00171 #define UCMODE_VOICE 2 00172 #define UCMODE_HOP 4 00173 #define UCMODE_PROTECT 8 00174 #define UCMODE_FOUNDER 16 00175 00181 class ucrec 00182 { 00183 public: 00187 long uc_modes; 00188 00192 chanrec *channel; 00193 00194 ucrec() { /* stub */ } 00195 virtual ~ucrec() { /* stub */ } 00196 }; 00197 00198 #endif 00199