1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: userrec class Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
6 <!-- Generated by Doxygen 1.3.3 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
8 <h1>userrec Class Reference</h1>Holds all information about a user This class stores all information about a user connected to the irc server.
9 <a href="#_details">More...</a>
11 <code>#include <<a class="el" href="users_8h-source.html">users.h</a>></code>
13 Inherits <a class="el" href="classconnection.html">connection</a>.
15 <a href="classuserrec-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
17 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
18 <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#a0">userrec</a> ()</td></tr>
20 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#a1">~userrec</a> ()</td></tr>
22 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual char * </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#a2">GetFullHost</a> ()</td></tr>
24 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. </em> <a href="#a2"></a><em><br><br></td></tr>
25 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual char * </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#a3">GetFullRealHost</a> ()</td></tr>
27 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. </em> <a href="#a3"></a><em><br><br></td></tr>
28 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#a4">IsInvited</a> (char *channel)</td></tr>
30 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if a user is invited to a channel. </em> <a href="#a4"></a><em><br><br></td></tr>
31 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#a5">InviteTo</a> (char *channel)</td></tr>
33 <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a channel to a users invite list (invites them to a channel). </em> <a href="#a5"></a><em><br><br></td></tr>
34 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#a6">RemoveInvite</a> (char *channel)</td></tr>
36 <tr><td class="mdescLeft"> </td><td class="mdescRight">Removes a channel from a users invite list. </em> <a href="#a6"></a><em><br><br></td></tr>
37 <tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#a7">HasPermission</a> (char *command)</td></tr>
39 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true or false for if a user can execute a privilaged oper command. </em> <a href="#a7"></a><em><br><br></td></tr>
40 <tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
41 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o0">nick</a> [NICKMAX]</td></tr>
43 <tr><td class="mdescLeft"> </td><td class="mdescRight">The users nickname. </em> <a href="#o0"></a><em><br><br></td></tr>
44 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o1">ident</a> [64]</td></tr>
46 <tr><td class="mdescLeft"> </td><td class="mdescRight">The users ident reply. </em> <a href="#o1"></a><em><br><br></td></tr>
47 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o2">dhost</a> [256]</td></tr>
49 <tr><td class="mdescLeft"> </td><td class="mdescRight">The host displayed to non-opers (used for cloaking etc). </em> <a href="#o2"></a><em><br><br></td></tr>
50 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o3">fullname</a> [128]</td></tr>
52 <tr><td class="mdescLeft"> </td><td class="mdescRight">The users full name. </em> <a href="#o3"></a><em><br><br></td></tr>
53 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o4">modes</a> [MAXBUF]</td></tr>
55 <tr><td class="mdescLeft"> </td><td class="mdescRight">The user's mode string. </em> <a href="#o4"></a><em><br><br></td></tr>
56 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classucrec.html">ucrec</a> </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o5">chans</a> [MAXCHANS]</td></tr>
58 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o6">server</a> [256]</td></tr>
60 <tr><td class="mdescLeft"> </td><td class="mdescRight">The server the user is connected to. </em> <a href="#o6"></a><em><br><br></td></tr>
61 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o7">awaymsg</a> [512]</td></tr>
63 <tr><td class="mdescLeft"> </td><td class="mdescRight">The user's away message. </em> <a href="#o7"></a><em><br><br></td></tr>
64 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o8">result</a> [256]</td></tr>
66 <tr><td class="mdescLeft"> </td><td class="mdescRight">Stores the result of the last GetFullHost or GetRealHost call. </em> <a href="#o8"></a><em><br><br></td></tr>
67 <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o9">flood</a></td></tr>
69 <tr><td class="mdescLeft"> </td><td class="mdescRight">Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood. </em> <a href="#o9"></a><em><br><br></td></tr>
70 <tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o10">timeout</a></td></tr>
72 <tr><td class="mdescLeft"> </td><td class="mdescRight">Number of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected. </em> <a href="#o10"></a><em><br><br></td></tr>
73 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o11">oper</a> [NICKMAX]</td></tr>
75 <tr><td class="mdescLeft"> </td><td class="mdescRight">The oper type they logged in as, if they are an oper. </em> <a href="#o11"></a><em><br><br></td></tr>
76 <tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o12">dns_done</a></td></tr>
78 <tr><td class="mdescLeft"> </td><td class="mdescRight">True when <a class="el" href="classDNS.html">DNS</a> lookups are completed. </em> <a href="#o12"></a><em><br><br></td></tr>
79 <tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o13">pingmax</a></td></tr>
81 <tr><td class="mdescLeft"> </td><td class="mdescRight">Number of seconds between PINGs for this user (set from <connect:allow> tag. </em> <a href="#o13"></a><em><br><br></td></tr>
82 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#o14">password</a> [MAXBUF]</td></tr>
84 <tr><td class="mdescLeft"> </td><td class="mdescRight">Password specified by the user when they registered. </em> <a href="#o14"></a><em><br><br></td></tr>
85 <tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
86 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="users_8h.html#a6">InvitedList</a> </td><td class="memItemRight" valign=bottom><a class="el" href="classuserrec.html#r0">invites</a></td></tr>
88 <tr><td class="mdescLeft"> </td><td class="mdescRight">A list of channels the user has a pending invite to. </em> <a href="#r0"></a><em><br><br></td></tr>
90 <hr><a name="_details"></a><h2>Detailed Description</h2>
91 Holds all information about a user This class stores all information about a user connected to the irc server.
93 Everything about a connection is stored here primarily, from the user's socket ID (file descriptor) through to the user's nickname and hostname. Use the Find method of the server class to locate a specific user by nickname.
97 Definition at line <a class="el" href="users_8h-source.html#l00093">93</a> of file <a class="el" href="users_8h-source.html">users.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
98 <a name="a0" doxytag="userrec::userrec"></a><p>
99 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
102 <table cellpadding="0" cellspacing="0" border="0">
104 <td class="md" nowrap valign="top"> userrec::userrec </td>
105 <td class="md" valign="top">( </td>
106 <td class="mdname1" valign="top" nowrap> </td>
107 <td class="md" valign="top"> ) </td>
108 <td class="md" nowrap></td>
115 <table cellspacing=5 cellpadding=0 border=0>
125 Definition at line <a class="el" href="users_8cpp-source.html#l00028">28</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
127 References <a class="el" href="users_8h-source.html#l00136">awaymsg</a>, <a class="el" href="connection_8h-source.html#l00199">connection::bytes_in</a>, <a class="el" href="connection_8h-source.html#l00203">connection::bytes_out</a>, <a class="el" href="channels_8h-source.html#l00268">ucrec::channel</a>, <a class="el" href="users_8h-source.html#l00127">chans</a>, <a class="el" href="connection_8h-source.html#l00207">connection::cmds_in</a>, <a class="el" href="connection_8h-source.html#l00211">connection::cmds_out</a>, <a class="el" href="users_8h-source.html#l00115">dhost</a>, <a class="el" href="users_8h-source.html#l00164">dns_done</a>, <a class="el" href="connection_8h-source.html#l00183">connection::fd</a>, <a class="el" href="users_8h-source.html#l00147">flood</a>, <a class="el" href="users_8h-source.html#l00119">fullname</a>, <a class="el" href="connection_8h-source.html#l00215">connection::haspassed</a>, <a class="el" href="connection_8h-source.html#l00187">connection::host</a>, <a class="el" href="users_8h-source.html#l00110">ident</a>, <a class="el" href="connection_8h-source.html#l00241">connection::idle_lastmsg</a>, <a class="el" href="connection_8h-source.html#l00195">connection::inbuf</a>, <a class="el" href="users_8h-source.html#l00099">invites</a>, <a class="el" href="connection_8h-source.html#l00191">connection::ip</a>, <a class="el" href="connection_8h-source.html#l00233">connection::lastping</a>, <a class="el" href="users_8h-source.html#l00125">modes</a>, <a class="el" href="users_8h-source.html#l00106">nick</a>, <a class="el" href="connection_8h-source.html#l00245">connection::nping</a>, <a class="el" href="users_8h-source.html#l00160">oper</a>, <a class="el" href="connection_8h-source.html#l00221">connection::port</a>, <a class="el" href="connection_8h-source.html#l00225">connection::registered</a>, <a class="el" href="users_8h-source.html#l00141">result</a>, <a class="el" href="users_8h-source.html#l00131">server</a>, <a class="el" href="connection_8h-source.html#l00237">connection::signon</a>, <a class="el" href="users_8h-source.html#l00153">timeout</a>, and <a class="el" href="channels_8h-source.html#l00263">ucrec::uc_modes</a>.
129 <div class="fragment"><pre>00029 {
130 00030 <span class="comment">// the PROPER way to do it, AVOID bzero at *ALL* costs</span>
131 00031 strcpy(nick,<span class="stringliteral">""</span>);
132 00032 strcpy(ip,<span class="stringliteral">"127.0.0.1"</span>);
133 00033 <a class="code" href="classuserrec.html#o10">timeout</a> = 0;
134 00034 strcpy(ident,<span class="stringliteral">""</span>);
135 00035 strcpy(host,<span class="stringliteral">""</span>);
136 00036 strcpy(dhost,<span class="stringliteral">""</span>);
137 00037 strcpy(fullname,<span class="stringliteral">""</span>);
138 00038 strcpy(modes,<span class="stringliteral">""</span>);
139 00039 strcpy(inbuf,<span class="stringliteral">""</span>);
140 00040 strcpy(server,<span class="stringliteral">""</span>);
141 00041 strcpy(awaymsg,<span class="stringliteral">""</span>);
142 00042 strcpy(oper,<span class="stringliteral">""</span>);
143 00043 <a class="code" href="classconnection.html#o0">fd</a> = <a class="code" href="classconnection.html#o12">lastping</a> = <a class="code" href="classconnection.html#o13">signon</a> = <a class="code" href="classconnection.html#o14">idle_lastmsg</a> = <a class="code" href="classconnection.html#o15">nping</a> = <a class="code" href="classconnection.html#o10">registered</a> = 0;
144 00044 <a class="code" href="classuserrec.html#o9">flood</a> = <a class="code" href="classconnection.html#o9">port</a> = <a class="code" href="classconnection.html#o4">bytes_in</a> = <a class="code" href="classconnection.html#o5">bytes_out</a> = <a class="code" href="classconnection.html#o6">cmds_in</a> = <a class="code" href="classconnection.html#o7">cmds_out</a> = 0;
145 00045 <a class="code" href="classconnection.html#o8">haspassed</a> = <span class="keyword">false</span>;
146 00046 <a class="code" href="classuserrec.html#o12">dns_done</a> = <span class="keyword">false</span>;
147 00047 strcpy(result,<span class="stringliteral">""</span>);
148 00048 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < MAXCHANS; i++)
150 00050 this-><a class="code" href="classuserrec.html#o5">chans</a>[i].<a class="code" href="classucrec.html#o1">channel</a> = NULL;
151 00051 this-><a class="code" href="classuserrec.html#o5">chans</a>[i].<a class="code" href="classucrec.html#o0">uc_modes</a> = 0;
153 00053 <a class="code" href="classuserrec.html#r0">invites</a>.clear();
158 <a name="a1" doxytag="userrec::~userrec"></a><p>
159 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
162 <table cellpadding="0" cellspacing="0" border="0">
164 <td class="md" nowrap valign="top"> virtual userrec::~<a class="el" href="classuserrec.html">userrec</a> </td>
165 <td class="md" valign="top">( </td>
166 <td class="mdname1" valign="top" nowrap> </td>
167 <td class="md" valign="top"> ) </td>
168 <td class="md" nowrap><code> [inline, virtual]</code></td>
175 <table cellspacing=5 cellpadding=0 border=0>
185 Definition at line <a class="el" href="users_8h-source.html#l00178">178</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
187 <div class="fragment"><pre>00178 { }
191 <hr><h2>Member Function Documentation</h2>
192 <a name="a2" doxytag="userrec::GetFullHost"></a><p>
193 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
196 <table cellpadding="0" cellspacing="0" border="0">
198 <td class="md" nowrap valign="top"> char * userrec::GetFullHost </td>
199 <td class="md" valign="top">( </td>
200 <td class="mdname1" valign="top" nowrap> </td>
201 <td class="md" valign="top"> ) </td>
202 <td class="md" nowrap><code> [virtual]</code></td>
209 <table cellspacing=5 cellpadding=0 border=0>
217 Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form.
221 Definition at line <a class="el" href="users_8cpp-source.html#l00058">58</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
223 References <a class="el" href="users_8h-source.html#l00115">dhost</a>, <a class="el" href="users_8h-source.html#l00110">ident</a>, <a class="el" href="users_8h-source.html#l00106">nick</a>, and <a class="el" href="users_8h-source.html#l00141">result</a>.
225 <div class="fragment"><pre>00059 {
226 00060 snprintf(result,MAXBUF,<span class="stringliteral">"%s!%s@%s"</span>,nick,ident,dhost);
227 00061 <span class="keywordflow">return</span> <a class="code" href="classuserrec.html#o8">result</a>;
232 <a name="a3" doxytag="userrec::GetFullRealHost"></a><p>
233 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
236 <table cellpadding="0" cellspacing="0" border="0">
238 <td class="md" nowrap valign="top"> char * userrec::GetFullRealHost </td>
239 <td class="md" valign="top">( </td>
240 <td class="mdname1" valign="top" nowrap> </td>
241 <td class="md" valign="top"> ) </td>
242 <td class="md" nowrap><code> [virtual]</code></td>
249 <table cellspacing=5 cellpadding=0 border=0>
257 Returns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form.
259 If any form of hostname cloaking is in operation, e.g. through a module, then this method will ignore it and return the true hostname.
261 Definition at line <a class="el" href="users_8cpp-source.html#l00065">65</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
263 References <a class="el" href="connection_8h-source.html#l00187">connection::host</a>, <a class="el" href="users_8h-source.html#l00110">ident</a>, <a class="el" href="users_8h-source.html#l00106">nick</a>, and <a class="el" href="users_8h-source.html#l00141">result</a>.
265 <div class="fragment"><pre>00066 {
266 00067 snprintf(result,MAXBUF,<span class="stringliteral">"%s!%s@%s"</span>,nick,ident,host);
267 00068 <span class="keywordflow">return</span> <a class="code" href="classuserrec.html#o8">result</a>;
272 <a name="a7" doxytag="userrec::HasPermission"></a><p>
273 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
276 <table cellpadding="0" cellspacing="0" border="0">
278 <td class="md" nowrap valign="top"> bool userrec::HasPermission </td>
279 <td class="md" valign="top">( </td>
280 <td class="md" nowrap valign="top">char * </td>
281 <td class="mdname1" valign="top" nowrap> <em>command</em> </td>
282 <td class="md" valign="top"> ) </td>
283 <td class="md" nowrap></td>
290 <table cellspacing=5 cellpadding=0 border=0>
298 Returns true or false for if a user can execute a privilaged oper command.
300 This is done by looking up their oper type from <a class="el" href="classuserrec.html#o11">userrec::oper</a>, then referencing this to their oper classes and checking the commands they can execute.
302 Definition at line <a class="el" href="users_8cpp-source.html#l00114">114</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
304 References <a class="el" href="channels_8cpp-source.html#l00101">config_f</a>, and <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>.
306 <div class="fragment"><pre>00115 {
307 00116 <span class="keywordtype">char</span> TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
308 00117 <span class="keywordtype">char</span>* mycmd;
309 00118 <span class="keywordtype">char</span>* savept;
310 00119 <span class="keywordtype">char</span>* savept2;
312 00121 <span class="comment">// are they even an oper at all?</span>
313 00122 <span class="keywordflow">if</span> (strchr(this->modes,<span class="charliteral">'o'</span>))
315 00124 log(DEBUG,<span class="stringliteral">"*** HasPermission: %s is an oper"</span>,this->nick);
316 00125 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j =0; j < ConfValueEnum(<span class="stringliteral">"type"</span>,&config_f); j++)
318 00127 ConfValue(<span class="stringliteral">"type"</span>,<span class="stringliteral">"name"</span>,j,TypeName,&config_f);
319 00128 <span class="keywordflow">if</span> (!strcmp(TypeName,this->oper))
321 00130 log(DEBUG,<span class="stringliteral">"*** HasPermission: %s is an oper of type '%s'"</span>,this->nick,this->oper);
322 00131 ConfValue(<span class="stringliteral">"type"</span>,<span class="stringliteral">"classes"</span>,j,Classes,&config_f);
323 00132 <span class="keywordtype">char</span>* myclass = strtok_r(Classes,<span class="stringliteral">" "</span>,&savept);
324 00133 <span class="keywordflow">while</span> (myclass)
326 00135 log(DEBUG,<span class="stringliteral">"*** HasPermission: checking classtype '%s'"</span>,myclass);
327 00136 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k =0; k < ConfValueEnum(<span class="stringliteral">"class"</span>,&config_f); k++)
329 00138 ConfValue(<span class="stringliteral">"class"</span>,<span class="stringliteral">"name"</span>,k,ClassName,&config_f);
330 00139 <span class="keywordflow">if</span> (!strcmp(ClassName,myclass))
332 00141 ConfValue(<span class="stringliteral">"class"</span>,<span class="stringliteral">"commands"</span>,k,CommandList,&config_f);
333 00142 log(DEBUG,<span class="stringliteral">"*** HasPermission: found class named %s with commands: '%s'"</span>,ClassName,CommandList);
336 00145 mycmd = strtok_r(CommandList,<span class="stringliteral">" "</span>,&savept2);
337 00146 <span class="keywordflow">while</span> (mycmd)
339 00148 <span class="keywordflow">if</span> (!strcasecmp(mycmd,command))
341 00150 log(DEBUG,<span class="stringliteral">"*** Command %s found, returning true"</span>,command);
342 00151 <span class="keywordflow">return</span> <span class="keyword">true</span>;
344 00153 mycmd = strtok_r(NULL,<span class="stringliteral">" "</span>,&savept2);
348 00157 myclass = strtok_r(NULL,<span class="stringliteral">" "</span>,&savept);
353 00162 <span class="keywordflow">return</span> <span class="keyword">false</span>;
358 <a name="a5" doxytag="userrec::InviteTo"></a><p>
359 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
362 <table cellpadding="0" cellspacing="0" border="0">
364 <td class="md" nowrap valign="top"> void userrec::InviteTo </td>
365 <td class="md" valign="top">( </td>
366 <td class="md" nowrap valign="top">char * </td>
367 <td class="mdname1" valign="top" nowrap> <em>channel</em> </td>
368 <td class="md" valign="top"> ) </td>
369 <td class="md" nowrap><code> [virtual]</code></td>
376 <table cellspacing=5 cellpadding=0 border=0>
384 Adds a channel to a users invite list (invites them to a channel).
388 Definition at line <a class="el" href="users_8cpp-source.html#l00085">85</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
390 References <a class="el" href="users_8h-source.html#l00039">Invited::channel</a>, and <a class="el" href="users_8h-source.html#l00099">invites</a>.
392 <div class="fragment"><pre>00086 {
393 00087 <a class="code" href="classInvited.html">Invited</a> i;
394 00088 strlcpy(i.<a class="code" href="classInvited.html#o0">channel</a>,channel,CHANMAX);
395 00089 <a class="code" href="classuserrec.html#r0">invites</a>.push_back(i);
400 <a name="a4" doxytag="userrec::IsInvited"></a><p>
401 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
404 <table cellpadding="0" cellspacing="0" border="0">
406 <td class="md" nowrap valign="top"> bool userrec::IsInvited </td>
407 <td class="md" valign="top">( </td>
408 <td class="md" nowrap valign="top">char * </td>
409 <td class="mdname1" valign="top" nowrap> <em>channel</em> </td>
410 <td class="md" valign="top"> ) </td>
411 <td class="md" nowrap><code> [virtual]</code></td>
418 <table cellspacing=5 cellpadding=0 border=0>
426 Returns true if a user is invited to a channel.
430 Definition at line <a class="el" href="users_8cpp-source.html#l00071">71</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
432 References <a class="el" href="users_8h-source.html#l00099">invites</a>.
434 <div class="fragment"><pre>00072 {
435 00073 <span class="keywordflow">for</span> (InvitedList::iterator i = <a class="code" href="classuserrec.html#r0">invites</a>.begin(); i != <a class="code" href="classuserrec.html#r0">invites</a>.end(); i++)
437 00075 <span class="keywordflow">if</span> (i->channel) {
438 00076 <span class="keywordflow">if</span> (!strcasecmp(i->channel,channel))
440 00078 <span class="keywordflow">return</span> <span class="keyword">true</span>;
444 00082 <span class="keywordflow">return</span> <span class="keyword">false</span>;
449 <a name="a6" doxytag="userrec::RemoveInvite"></a><p>
450 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
453 <table cellpadding="0" cellspacing="0" border="0">
455 <td class="md" nowrap valign="top"> void userrec::RemoveInvite </td>
456 <td class="md" valign="top">( </td>
457 <td class="md" nowrap valign="top">char * </td>
458 <td class="mdname1" valign="top" nowrap> <em>channel</em> </td>
459 <td class="md" valign="top"> ) </td>
460 <td class="md" nowrap><code> [virtual]</code></td>
467 <table cellspacing=5 cellpadding=0 border=0>
475 Removes a channel from a users invite list.
477 This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.
479 Definition at line <a class="el" href="users_8cpp-source.html#l00092">92</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
481 References <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, and <a class="el" href="users_8h-source.html#l00099">invites</a>.
483 <div class="fragment"><pre>00093 {
484 00094 log(DEBUG,<span class="stringliteral">"Removing invites"</span>);
485 00095 <span class="keywordflow">if</span> (channel)
487 00097 <span class="keywordflow">if</span> (<a class="code" href="classuserrec.html#r0">invites</a>.size())
489 00099 <span class="keywordflow">for</span> (InvitedList::iterator i = <a class="code" href="classuserrec.html#r0">invites</a>.begin(); i != <a class="code" href="classuserrec.html#r0">invites</a>.end(); i++)
491 00101 <span class="keywordflow">if</span> (i->channel)
493 00103 <span class="keywordflow">if</span> (!strcasecmp(i->channel,channel))
495 00105 <a class="code" href="classuserrec.html#r0">invites</a>.erase(i);
496 00106 <span class="keywordflow">return</span>;
506 <hr><h2>Member Data Documentation</h2>
507 <a name="o7" doxytag="userrec::awaymsg"></a><p>
508 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
511 <table cellpadding="0" cellspacing="0" border="0">
513 <td class="md" nowrap valign="top"> char <a class="el" href="classuserrec.html#o7">userrec::awaymsg</a>[512]
518 <table cellspacing=5 cellpadding=0 border=0>
526 The user's away message.
528 If this string is empty, the user is not marked as away.
530 Definition at line <a class="el" href="users_8h-source.html#l00136">136</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
532 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
535 <a name="o5" doxytag="userrec::chans"></a><p>
536 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
539 <table cellpadding="0" cellspacing="0" border="0">
541 <td class="md" nowrap valign="top"> <a class="el" href="classucrec.html">ucrec</a> <a class="el" href="classuserrec.html#o5">userrec::chans</a>[MAXCHANS]
546 <table cellspacing=5 cellpadding=0 border=0>
556 Definition at line <a class="el" href="users_8h-source.html#l00127">127</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
558 Referenced by <a class="el" href="modules_8cpp-source.html#l00665">Server::PseudoToUser()</a>, and <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
561 <a name="o2" doxytag="userrec::dhost"></a><p>
562 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
565 <table cellpadding="0" cellspacing="0" border="0">
567 <td class="md" nowrap valign="top"> char <a class="el" href="classuserrec.html#o2">userrec::dhost</a>[256]
572 <table cellspacing=5 cellpadding=0 border=0>
580 The host displayed to non-opers (used for cloaking etc).
582 This usually matches the value of <a class="el" href="classconnection.html#o1">userrec::host</a>.
584 Definition at line <a class="el" href="users_8h-source.html#l00115">115</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
586 Referenced by <a class="el" href="users_8cpp-source.html#l00058">GetFullHost()</a>, and <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
589 <a name="o12" doxytag="userrec::dns_done"></a><p>
590 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
593 <table cellpadding="0" cellspacing="0" border="0">
595 <td class="md" nowrap valign="top"> bool <a class="el" href="classuserrec.html#o12">userrec::dns_done</a>
600 <table cellspacing=5 cellpadding=0 border=0>
608 True when <a class="el" href="classDNS.html">DNS</a> lookups are completed.
612 Definition at line <a class="el" href="users_8h-source.html#l00164">164</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
614 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
617 <a name="o9" doxytag="userrec::flood"></a><p>
618 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
621 <table cellpadding="0" cellspacing="0" border="0">
623 <td class="md" nowrap valign="top"> int <a class="el" href="classuserrec.html#o9">userrec::flood</a>
628 <table cellspacing=5 cellpadding=0 border=0>
636 Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood.
640 Definition at line <a class="el" href="users_8h-source.html#l00147">147</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
642 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
645 <a name="o3" doxytag="userrec::fullname"></a><p>
646 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
649 <table cellpadding="0" cellspacing="0" border="0">
651 <td class="md" nowrap valign="top"> char <a class="el" href="classuserrec.html#o3">userrec::fullname</a>[128]
656 <table cellspacing=5 cellpadding=0 border=0>
668 Definition at line <a class="el" href="users_8h-source.html#l00119">119</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
670 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
673 <a name="o1" doxytag="userrec::ident"></a><p>
674 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
677 <table cellpadding="0" cellspacing="0" border="0">
679 <td class="md" nowrap valign="top"> char <a class="el" href="classuserrec.html#o1">userrec::ident</a>[64]
684 <table cellspacing=5 cellpadding=0 border=0>
692 The users ident reply.
696 Definition at line <a class="el" href="users_8h-source.html#l00110">110</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
698 Referenced by <a class="el" href="users_8cpp-source.html#l00058">GetFullHost()</a>, <a class="el" href="users_8cpp-source.html#l00065">GetFullRealHost()</a>, <a class="el" href="modules_8cpp-source.html#l00665">Server::PseudoToUser()</a>, <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00656">Server::UserToPseudo()</a>. </td>
701 <a name="r0" doxytag="userrec::invites"></a><p>
702 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
705 <table cellpadding="0" cellspacing="0" border="0">
707 <td class="md" nowrap valign="top"> <a class="el" href="users_8h.html#a6">InvitedList</a> <a class="el" href="classuserrec.html#r0">userrec::invites</a><code> [private]</code>
712 <table cellspacing=5 cellpadding=0 border=0>
720 A list of channels the user has a pending invite to.
724 Definition at line <a class="el" href="users_8h-source.html#l00099">99</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
726 Referenced by <a class="el" href="users_8cpp-source.html#l00085">InviteTo()</a>, <a class="el" href="users_8cpp-source.html#l00071">IsInvited()</a>, <a class="el" href="users_8cpp-source.html#l00092">RemoveInvite()</a>, and <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
729 <a name="o4" doxytag="userrec::modes"></a><p>
730 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
733 <table cellpadding="0" cellspacing="0" border="0">
735 <td class="md" nowrap valign="top"> char <a class="el" href="classuserrec.html#o4">userrec::modes</a>[MAXBUF]
740 <table cellspacing=5 cellpadding=0 border=0>
748 The user's mode string.
750 This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit.
752 Definition at line <a class="el" href="users_8h-source.html#l00125">125</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
754 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
757 <a name="o0" doxytag="userrec::nick"></a><p>
758 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
761 <table cellpadding="0" cellspacing="0" border="0">
763 <td class="md" nowrap valign="top"> char <a class="el" href="classuserrec.html#o0">userrec::nick</a>[NICKMAX]
768 <table cellspacing=5 cellpadding=0 border=0>
778 An invalid nickname indicates an unregistered connection prior to the NICK command.
780 Definition at line <a class="el" href="users_8h-source.html#l00106">106</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
782 Referenced by <a class="el" href="modules_8cpp-source.html#l00932">ConfigReader::DumpErrors()</a>, <a class="el" href="users_8cpp-source.html#l00058">GetFullHost()</a>, <a class="el" href="users_8cpp-source.html#l00065">GetFullRealHost()</a>, <a class="el" href="modules_8cpp-source.html#l00665">Server::PseudoToUser()</a>, <a class="el" href="modules_8cpp-source.html#l00476">Server::QuitUser()</a>, and <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
785 <a name="o11" doxytag="userrec::oper"></a><p>
786 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
789 <table cellpadding="0" cellspacing="0" border="0">
791 <td class="md" nowrap valign="top"> char <a class="el" href="classuserrec.html#o11">userrec::oper</a>[NICKMAX]
796 <table cellspacing=5 cellpadding=0 border=0>
804 The oper type they logged in as, if they are an oper.
806 This is used to check permissions in operclasses, so that we can say 'yay' or 'nay' to any commands they issue. The value of this is the value of a valid 'type name=' tag.
808 Definition at line <a class="el" href="users_8h-source.html#l00160">160</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
810 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
813 <a name="o14" doxytag="userrec::password"></a><p>
814 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
817 <table cellpadding="0" cellspacing="0" border="0">
819 <td class="md" nowrap valign="top"> char <a class="el" href="classuserrec.html#o14">userrec::password</a>[MAXBUF]
824 <table cellspacing=5 cellpadding=0 border=0>
832 Password specified by the user when they registered.
834 This is stored even if the block doesnt need a password, so that modules may check it.
836 Definition at line <a class="el" href="users_8h-source.html#l00174">174</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
839 <a name="o13" doxytag="userrec::pingmax"></a><p>
840 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
843 <table cellpadding="0" cellspacing="0" border="0">
845 <td class="md" nowrap valign="top"> unsigned long <a class="el" href="classuserrec.html#o13">userrec::pingmax</a>
850 <table cellspacing=5 cellpadding=0 border=0>
858 Number of seconds between PINGs for this user (set from <connect:allow> tag.
862 Definition at line <a class="el" href="users_8h-source.html#l00168">168</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
865 <a name="o8" doxytag="userrec::result"></a><p>
866 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
869 <table cellpadding="0" cellspacing="0" border="0">
871 <td class="md" nowrap valign="top"> char <a class="el" href="classuserrec.html#o8">userrec::result</a>[256]
876 <table cellspacing=5 cellpadding=0 border=0>
884 Stores the result of the last GetFullHost or GetRealHost call.
886 You may use this to increase the speed of use of this class.
888 Definition at line <a class="el" href="users_8h-source.html#l00141">141</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
890 Referenced by <a class="el" href="users_8cpp-source.html#l00058">GetFullHost()</a>, <a class="el" href="users_8cpp-source.html#l00065">GetFullRealHost()</a>, and <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
893 <a name="o6" doxytag="userrec::server"></a><p>
894 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
897 <table cellpadding="0" cellspacing="0" border="0">
899 <td class="md" nowrap valign="top"> char <a class="el" href="classuserrec.html#o6">userrec::server</a>[256]
904 <table cellspacing=5 cellpadding=0 border=0>
912 The server the user is connected to.
916 Definition at line <a class="el" href="users_8h-source.html#l00131">131</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
918 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
921 <a name="o10" doxytag="userrec::timeout"></a><p>
922 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
925 <table cellpadding="0" cellspacing="0" border="0">
927 <td class="md" nowrap valign="top"> unsigned long <a class="el" href="classuserrec.html#o10">userrec::timeout</a>
932 <table cellspacing=5 cellpadding=0 border=0>
940 Number of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected.
944 Definition at line <a class="el" href="users_8h-source.html#l00153">153</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
946 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec()</a>. </td>
949 <hr>The documentation for this class was generated from the following files:<ul>
950 <li><a class="el" href="users_8h-source.html">users.h</a><li><a class="el" href="users_8cpp-source.html">users.cpp</a></ul>
951 <hr size="1"><address style="align: right;"><small>Generated on Tue Apr 26 17:11:52 2005 for InspIRCd by
952 <a href="http://www.doxygen.org/index.html">
953 <img src="doxygen.png" alt="doxygen" align="middle" border=0 >
954 </a>1.3.3 </small></address>