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

users.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
00002  *       | Inspire Internet Relay Chat Daemon |
00003  *       +------------------------------------+
00004  *
00005  *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
00006  *                       E-mail:
00007  *                <brain@chatspike.net>
00008  *                <Craig@chatspike.net>
00009  *     
00010  * Written by Craig Edwards, Craig McLure, and others.
00011  * This program is free but copyrighted software; see
00012  *            the file COPYING for details.
00013  *
00014  * ---------------------------------------------------
00015  */
00016 
00017 #include "inspircd_config.h" 
00018 #include "channels.h"
00019 #include "connection.h"
00020 #include "inspstring.h"
00021 #include <string>
00022  
00023 #ifndef __USERS_H__ 
00024 #define __USERS_H__ 
00025  
00026 #define STATUS_OP       4
00027 #define STATUS_HOP      2
00028 #define STATUS_VOICE    1
00029 #define STATUS_NORMAL   0
00030 
00031 #define CC_ALLOW        0
00032 #define CC_DENY         1
00033 
00036 class Invited : public classbase
00037 {
00038  public:
00039         char channel[CHANMAX];
00040 };
00041 
00042 
00045 class ConnectClass : public classbase
00046 {
00047  public:
00050         int type;
00053         int registration_timeout;
00056         int flood;
00059         char host[MAXBUF];
00062         char pass[MAXBUF];
00063         
00064         ConnectClass()
00065         {
00066                 registration_timeout = 0;
00067                 flood = 0;
00068                 strlcpy(host,"",MAXBUF);
00069                 strlcpy(pass,"",MAXBUF);
00070         }
00071 };
00072 
00075 typedef std::vector<Invited> InvitedList;
00076 
00077 
00078 
00081 typedef std::vector<ConnectClass> ClassVector;
00082 
00089 class userrec : public connection
00090 {
00091  private:
00092 
00095         InvitedList invites;
00096  public:
00097         
00102         char nick[NICKMAX];
00103         
00106         char ident[64];
00107 
00111         char dhost[256];
00112         
00115         char fullname[128];
00116         
00121         char modes[MAXBUF];
00122         
00123         ucrec chans[MAXCHANS];
00124         
00127         char server[256];
00128         
00132         char awaymsg[512];
00133         
00137         char result[256];
00138         
00143         int flood;
00144         
00149         unsigned long timeout;
00150         
00156         char oper[NICKMAX];
00157 
00160         bool dns_done;
00161 
00162         userrec();
00163         
00164         virtual ~userrec() {  }
00165         
00170         virtual char* GetFullHost();
00171         
00177         virtual char* GetFullRealHost();
00178         
00181         virtual bool IsInvited(char* channel);
00182         
00185         virtual void InviteTo(char* channel);
00186         
00191         virtual void RemoveInvite(char* channel);
00192         
00197         bool HasPermission(char* command);
00198         
00199 };
00200 
00201 
00202 #endif

Generated on Sat Apr 2 19:27:01 2005 for InspIRCd by doxygen 1.3.3