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

channels.h

Go to the documentation of this file.
00001 /*
00002 
00003 $Log$
00003 Revision 1.3  2003/01/26 23:52:47  brain
00003 Modified documentation for base classes
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 "base.h"
00024 #include <time.h>
00025 #include <vector>
00026 
00027 #ifndef __CHANNELS_H__
00028 #define __CHANNELS_H__
00029 
00033 class HostItem : public classbase
00034 {
00035  public:
00036         time_t set_time;
00037         char set_by[NICKMAX];
00038         char data[MAXBUF];
00039 
00040         HostItem() { /* stub */ }
00041         virtual ~HostItem() { /* stub */ }
00042 };
00043 
00044 // banlist is inherited from HostList mainly for readability
00045 // reasons only
00046 
00049 class BanItem : public HostItem
00050 {
00051 };
00052 
00053 // same with this...
00054 
00057 class ExemptItem : public HostItem
00058 {
00059 };
00060 
00061 // and this...
00062 
00065 class InviteItem : public HostItem
00066 {
00067 };
00068 
00069 
00072 typedef vector<BanItem>         BanList;
00073 
00076 typedef vector<ExemptItem>      ExemptList;
00077 
00080 typedef vector<InviteItem>      InviteList;
00081 
00086 class chanrec : public classbase
00087 {
00088  public:
00091         char name[CHANMAX]; /* channel name */
00095         char custom_modes[MAXMODES];     /* modes handled by modules */
00099         char topic[MAXBUF];
00102         time_t created;
00106         time_t topicset;
00110         char setby[NICKMAX];
00111 
00115         long limit;
00116         
00120         char key[32];
00121         
00124         short int topiclock;
00125         
00128         short int noexternal;
00129         
00132         short int inviteonly;
00133         
00136         short int moderated;
00137         
00141         short int secret;
00142         
00146         short int c_private;
00147         
00150         BanList bans;
00151 
00154         chanrec()
00155         {
00156                 strcpy(name,"");
00157                 strcpy(custom_modes,"");
00158                 strcpy(topic,"");
00159                 strcpy(setby,"");
00160                 strcpy(key,"");
00161                 created = topicset = limit = 0;
00162                 topiclock = noexternal = inviteonly = moderated = secret = c_private = false;
00163         }
00164 
00165         virtual ~chanrec() { /* stub */ }
00166 };
00167 
00168 /* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o
00169  * needs to come AFTER struct chanrec */
00170 
00171 #define UCMODE_OP      1
00172 #define UCMODE_VOICE   2
00173 #define UCMODE_HOP     4
00174 #define UCMODE_PROTECT 8
00175 #define UCMODE_FOUNDER 16
00176  
00182 class ucrec : public classbase
00183 {
00184  public:
00188         long uc_modes;
00189         
00193         chanrec *channel;
00194 
00195         ucrec() { /* stub */ }
00196         virtual ~ucrec() { /* stub */ }
00197 };
00198 
00199 #endif
00200 

Generated on Sun Jan 26 23:45:47 2003 for InspIRCd by doxygen1.3-rc2