00001 /* 00002 00003 $Log$ 00003 Revision 1.1 2003/01/23 19:45:57 brain 00003 Initial revision 00003 00003 Revision 1.6 2003/01/22 20:59:12 brain 00003 Added FileReader class documentation 00003 00004 Revision 1.7 2003/01/22 00:44:26 brain 00005 Added documentation comments 00006 00007 Revision 1.6 2003/01/21 21:11:17 brain 00008 Added documentation 00009 00010 Revision 1.5 2003/01/16 20:11:55 brain 00011 fixed some ugly pointer bugs (thanks dblack and a|KK|y!) 00012 00013 Revision 1.4 2003/01/15 22:47:44 brain 00014 Changed user and channel structs to classes (finally) 00015 00016 00017 */ 00018 00019 #include "inspircd_config.h" 00020 #include <time.h> 00021 #include <vector> 00022 00023 #ifndef __CHANNELS_H__ 00024 #define __CHANNELS_H__ 00025 00029 class HostItem 00030 { 00031 public: 00032 time_t set_time; 00033 char set_by[NICKMAX]; 00034 char data[MAXBUF]; 00035 00036 HostItem() { /* stub */ } 00037 virtual ~HostItem() { /* stub */ } 00038 }; 00039 00040 // banlist is inherited from HostList mainly for readability 00041 // reasons only 00042 00045 class BanItem : public HostItem 00046 { 00047 }; 00048 00049 // same with this... 00050 00053 class ExemptItem : public HostItem 00054 { 00055 }; 00056 00057 // and this... 00058 00061 class InviteItem : public HostItem 00062 { 00063 }; 00064 00065 00068 typedef vector<BanItem> BanList; 00069 00072 typedef vector<ExemptItem> ExemptList; 00073 00076 typedef vector<InviteItem> InviteList; 00077 00082 class chanrec 00083 { 00084 public: 00087 char name[CHANMAX]; /* channel name */ 00091 char custom_modes[MAXMODES]; /* modes handled by modules */ 00095 char topic[MAXBUF]; 00098 time_t created; 00102 time_t topicset; 00106 char setby[NICKMAX]; 00107 00111 long limit; 00112 00116 char key[32]; 00117 00120 short int topiclock; 00121 00124 short int noexternal; 00125 00128 short int inviteonly; 00129 00132 short int moderated; 00133 00137 short int secret; 00138 00142 short int c_private; 00143 00146 BanList bans; 00147 00150 chanrec() 00151 { 00152 strcpy(name,""); 00153 strcpy(custom_modes,""); 00154 strcpy(topic,""); 00155 strcpy(setby,""); 00156 strcpy(key,""); 00157 created = topicset = limit = 0; 00158 topiclock = noexternal = inviteonly = moderated = secret = c_private = false; 00159 } 00160 00161 virtual ~chanrec() { /* stub */ } 00162 }; 00163 00164 /* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o 00165 * needs to come AFTER struct chanrec */ 00166 00167 #define UCMODE_OP 1 00168 #define UCMODE_VOICE 2 00169 #define UCMODE_HOP 4 00170 #define UCMODE_PROTECT 8 00171 #define UCMODE_FOUNDER 16 00172 00178 class ucrec 00179 { 00180 public: 00184 long uc_modes; 00185 00189 chanrec *channel; 00190 00191 ucrec() { /* stub */ } 00192 virtual ~ucrec() { /* stub */ } 00193 }; 00194 00195 #endif 00196