4 Revision 1.3 2003/01/27 00:22:53 brain
6 Moved some classes below base class
8 Revision 1.2 2003/01/26 23:52:59 brain
9 Modified documentation for base classes
12 Revision 1.1.1.1 2003/01/23 19:45:58 brain
13 InspIRCd second source tree
15 Revision 1.9 2003/01/22 00:44:26 brain
16 Added documentation comments
18 Revision 1.8 2003/01/21 21:11:17 brain
21 Revision 1.7 2003/01/17 13:21:38 brain
22 Added CONNECT ALLOW and CONNECT DENY config tags
25 Revision 1.6 2003/01/17 10:37:55 brain
26 Added /INVITE command and relevent structures
28 Revision 1.5 2003/01/16 20:11:56 brain
29 fixed some ugly pointer bugs (thanks dblack and a|KK|y!)
31 Revision 1.4 2003/01/15 22:47:44 brain
32 Changed user and channel structs to classes (finally)
34 Revision 1.3 2003/01/14 21:14:30 brain
35 added /ISON command (for mIRC etc basic notify)
40 #include "inspircd_config.h"
42 #include "connection.h"
51 #define STATUS_VOICE 1
52 #define STATUS_NORMAL 0
57 /** Holds a channel name to which a user has been invited.
59 class Invited : public classbase
62 char channel[CHANMAX];
66 /** Holds information relevent to <connect allow> and <connect deny> tags in the config file.
68 class ConnectClass : public classbase
76 /** Holds a complete list of all channels to which a user has been invited and has not yet joined.
78 typedef vector<Invited> InvitedList;
82 /** Holds a complete list of all allow and deny tags from the configuration file (connection classes)
84 typedef vector<ConnectClass> ClassVector;
86 /** Holds all information about a user
87 * This class stores all information about a user connected to the irc server. Everything about a
88 * connection is stored here primarily, from the user's socket ID (file descriptor) through to the
89 * user's nickname and hostname. Use the Find method of the server class to locate a specific user
92 class userrec : public connection
96 /** A list of channels the user has a pending invite to.
101 /** The users nickname.
102 * An invalid nickname indicates an unregistered connection prior to the NICK command.
107 /** The users ident reply.
111 /** The host displayed to non-opers (used for cloaking etc).
112 * This usually matches the value of userrec::host.
116 /** The users full name.
120 /** The user's mode string.
121 * This may contain any of the following RFC characters: o, w, s, i
122 * Your module may define other mode characters as it sees fit.
126 ucrec chans[MAXCHANS];
128 /** The server the user is connected to.
132 /** The user's away message.
133 * If this string is empty, the user is not marked as away.
137 /** Stores the result of the last GetFullHost or GetRealHost call.
138 * You may use this to increase the speed of use of this class.
144 virtual ~userrec() { }
146 /** Returns the full displayed host of the user
147 * This member function returns the hostname of the user as seen by other users
148 * on the server, in nick!ident&at;host form.
150 virtual char* GetFullHost();
152 /** Returns the full real host of the user
153 * This member function returns the hostname of the user as seen by other users
154 * on the server, in nick!ident&at;host form. If any form of hostname cloaking is in operation,
155 * e.g. through a module, then this method will ignore it and return the true hostname.
157 virtual char* GetFullRealHost();
159 /** Returns true if a user is invited to a channel.
161 virtual bool IsInvited(char* channel);
163 /** Adds a channel to a users invite list (invites them to a channel)
165 virtual void InviteTo(char* channel);
167 /** Removes a channel from a users invite list.
168 * This member function is called on successfully joining an invite only channel
169 * to which the user has previously been invited, to clear the invitation.
171 virtual void RemoveInvite(char* channel);