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