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         int pingtime;
00065         char pass[MAXBUF];
00066         
00067         ConnectClass()
00068         {
00069                 registration_timeout = 0;
00070                 flood = 0;
00071                 pingtime = 0;
00072                 strlcpy(host,"",MAXBUF);
00073                 strlcpy(pass,"",MAXBUF);
00074         }
00075 };
00076 
00079 typedef std::vector<Invited> InvitedList;
00080 
00081 
00082 
00085 typedef std::vector<ConnectClass> ClassVector;
00086 
00093 class userrec : public connection
00094 {
00095  private:
00096 
00099         InvitedList invites;
00100  public:
00101         
00106         char nick[NICKMAX];
00107         
00110         char ident[64];
00111 
00115         char dhost[256];
00116         
00119         char fullname[128];
00120         
00125         char modes[MAXBUF];
00126         
00127         ucrec chans[MAXCHANS];
00128         
00131         char server[256];
00132         
00136         char awaymsg[512];
00137         
00141         char result[256];
00142         
00147         int flood;
00148         
00153         unsigned long timeout;
00154         
00160         char oper[NICKMAX];
00161 
00164         bool dns_done;
00165 
00168         unsigned long pingmax;
00169 
00170         userrec();
00171         
00172         virtual ~userrec() {  }
00173         
00178         virtual char* GetFullHost();
00179         
00185         virtual char* GetFullRealHost();
00186         
00189         virtual bool IsInvited(char* channel);
00190         
00193         virtual void InviteTo(char* channel);
00194         
00199         virtual void RemoveInvite(char* channel);
00200         
00205         bool HasPermission(char* command);
00206         
00207 };
00208 
00209 
00210 #endif

Generated on Wed Apr 13 12:32:17 2005 for InspIRCd by doxygen 1.3.3