]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classuserrec.html
Added documentation of new ConfigReader methods suggested by Azhrarn for sanity
[user/henk/code/inspircd.git] / docs / module-doc / classuserrec.html
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>userrec class Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3-rc3 -->
7 <center>
8 <a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
9 <hr><h1>userrec Class Reference</h1>Holds all information about a user This class stores all information about a user connected to the irc server. 
10 <a href="#_details">More...</a>
11 <p>
12 <code>#include &lt;<a class="el" href="users_8h-source.html">users.h</a>&gt;</code>
13 <p>
14 Inheritance diagram for userrec:<p><center><img src="classuserrec__inherit__graph.gif" border="0" usemap="#userrec__inherit__map" alt="Inheritance graph"></center>
15 <map name="userrec__inherit__map">
16 <area href="classconnection.html" shape="rect" coords="7,155,76,176" alt="">
17 <area href="classExtensible.html" shape="rect" coords="7,86,76,107" alt="">
18 <area href="classclassbase.html" shape="rect" coords="8,16,75,38" alt="">
19 </map>
20 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for userrec:<p><center><img src="classuserrec__coll__graph.gif" border="0" usemap="#userrec__coll__map" alt="Collaboration graph"></center>
21 <map name="userrec__coll__map">
22 <area href="classconnection.html" shape="rect" coords="204,368,273,389" alt="">
23 <area href="classucrec.html" shape="rect" coords="216,627,261,648" alt="">
24 </map>
25 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classuserrec-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
26 <tr><td></td></tr>
27 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
28 <tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#a0">userrec</a> ()</td></tr>
29 <tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#a1">~userrec</a> ()</td></tr>
30 <tr><td nowrap align=right valign=top>virtual char *&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#a2">GetFullHost</a> ()</td></tr>
31 <tr><td>&nbsp;</td><td><font size=-1><em>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></em></font><br><br></td></tr>
32 <tr><td nowrap align=right valign=top>virtual char *&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#a3">GetFullRealHost</a> ()</td></tr>
33 <tr><td>&nbsp;</td><td><font size=-1><em>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></em></font><br><br></td></tr>
34 <tr><td nowrap align=right valign=top>virtual bool&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#a4">IsInvited</a> (char *channel)</td></tr>
35 <tr><td>&nbsp;</td><td><font size=-1><em>Returns true if a user is invited to a channel.</em> <a href="#a4"></a><em></em></font><br><br></td></tr>
36 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#a5">InviteTo</a> (char *channel)</td></tr>
37 <tr><td>&nbsp;</td><td><font size=-1><em>Adds a channel to a users invite list (invites them to a channel).</em> <a href="#a5"></a><em></em></font><br><br></td></tr>
38 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#a6">RemoveInvite</a> (char *channel)</td></tr>
39 <tr><td>&nbsp;</td><td><font size=-1><em>Removes a channel from a users invite list.</em> <a href="#a6"></a><em></em></font><br><br></td></tr>
40 <tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#a7">HasPermission</a> (char *command)</td></tr>
41 <tr><td>&nbsp;</td><td><font size=-1><em>Returns true or false for if a user can execute a privilaged oper command.</em> <a href="#a7"></a><em></em></font><br><br></td></tr>
42 <tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
43 <tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m0">nick</a> [NICKMAX]</td></tr>
44 <tr><td>&nbsp;</td><td><font size=-1><em>The users nickname.</em> <a href="#m0"></a><em></em></font><br><br></td></tr>
45 <tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m1">ident</a> [64]</td></tr>
46 <tr><td>&nbsp;</td><td><font size=-1><em>The users ident reply.</em> <a href="#m1"></a><em></em></font><br><br></td></tr>
47 <tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m2">dhost</a> [256]</td></tr>
48 <tr><td>&nbsp;</td><td><font size=-1><em>The host displayed to non-opers (used for cloaking etc).</em> <a href="#m2"></a><em></em></font><br><br></td></tr>
49 <tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m3">fullname</a> [128]</td></tr>
50 <tr><td>&nbsp;</td><td><font size=-1><em>The users full name.</em> <a href="#m3"></a><em></em></font><br><br></td></tr>
51 <tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m4">modes</a> [MAXBUF]</td></tr>
52 <tr><td>&nbsp;</td><td><font size=-1><em>The user's mode string.</em> <a href="#m4"></a><em></em></font><br><br></td></tr>
53 <tr><td nowrap align=right valign=top><a class="el" href="classucrec.html">ucrec</a>&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m5">chans</a> [MAXCHANS]</td></tr>
54 <tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m6">server</a> [256]</td></tr>
55 <tr><td>&nbsp;</td><td><font size=-1><em>The server the user is connected to.</em> <a href="#m6"></a><em></em></font><br><br></td></tr>
56 <tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m7">awaymsg</a> [512]</td></tr>
57 <tr><td>&nbsp;</td><td><font size=-1><em>The user's away message.</em> <a href="#m7"></a><em></em></font><br><br></td></tr>
58 <tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m8">result</a> [256]</td></tr>
59 <tr><td>&nbsp;</td><td><font size=-1><em>Stores the result of the last GetFullHost or GetRealHost call.</em> <a href="#m8"></a><em></em></font><br><br></td></tr>
60 <tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m9">flood</a></td></tr>
61 <tr><td>&nbsp;</td><td><font size=-1><em>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="#m9"></a><em></em></font><br><br></td></tr>
62 <tr><td nowrap align=right valign=top>unsigned long&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m10">timeout</a></td></tr>
63 <tr><td>&nbsp;</td><td><font size=-1><em>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="#m10"></a><em></em></font><br><br></td></tr>
64 <tr><td nowrap align=right valign=top>char&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#m11">oper</a> [NICKMAX]</td></tr>
65 <tr><td>&nbsp;</td><td><font size=-1><em>The oper type they logged in as, if they are an oper.</em> <a href="#m11"></a><em></em></font><br><br></td></tr>
66 <tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
67 <tr><td nowrap align=right valign=top><a class="el" href="users_8h.html#a6">InvitedList</a>&nbsp;</td><td valign=bottom><a class="el" href="classuserrec.html#o0">invites</a></td></tr>
68 <tr><td>&nbsp;</td><td><font size=-1><em>A list of channels the user has a pending invite to.</em> <a href="#o0"></a><em></em></font><br><br></td></tr>
69 </table>
70 <hr><a name="_details"></a><h2>Detailed Description</h2>
71 Holds all information about a user This class stores all information about a user connected to the irc server.
72 <p>
73 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. 
74 <p>
75
76 <p>
77 Definition at line <a class="el" href="users_8h-source.html#l00078">78</a> of file <a class="el" href="users_8h-source.html">users.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
78 <a name="a0" doxytag="userrec::userrec"></a><p>
79 <table width="100%" cellpadding="2" cellspacing="0" border="0">
80   <tr>
81     <td class="md">
82       <table cellpadding="0" cellspacing="0" border="0">
83         <tr>
84           <td class="md" nowrap valign="top"> userrec::userrec </td>
85           <td class="md" valign="top">(&nbsp;</td>
86           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
87           <td class="md" valign="top">)&nbsp;</td>
88           <td class="md" nowrap></td>
89         </tr>
90
91       </table>
92     </td>
93   </tr>
94 </table>
95 <table cellspacing=5 cellpadding=0 border=0>
96   <tr>
97     <td>
98       &nbsp;
99     </td>
100     <td>
101
102 <p>
103
104 <p>
105 Definition at line <a class="el" href="users_8cpp-source.html#l00013">13</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
106 <p>
107 References <a class="el" href="connection_8h-source.html#l00182">connection::bytes_in</a>, <a class="el" href="connection_8h-source.html#l00186">connection::bytes_out</a>, <a class="el" href="channels_8h-source.html#l00202">ucrec::channel</a>, <a class="el" href="users_8h-source.html#l00112">chans</a>, <a class="el" href="connection_8h-source.html#l00190">connection::cmds_in</a>, <a class="el" href="connection_8h-source.html#l00194">connection::cmds_out</a>, <a class="el" href="connection_8h-source.html#l00166">connection::fd</a>, <a class="el" href="users_8h-source.html#l00132">flood</a>, <a class="el" href="connection_8h-source.html#l00198">connection::haspassed</a>, <a class="el" href="connection_8h-source.html#l00224">connection::idle_lastmsg</a>, <a class="el" href="users_8h-source.html#l00084">invites</a>, <a class="el" href="connection_8h-source.html#l00216">connection::lastping</a>, <a class="el" href="connection_8h-source.html#l00228">connection::nping</a>, <a class="el" href="connection_8h-source.html#l00204">connection::port</a>, <a class="el" href="connection_8h-source.html#l00208">connection::registered</a>, <a class="el" href="connection_8h-source.html#l00220">connection::signon</a>, <a class="el" href="users_8h-source.html#l00138">timeout</a>, and <a class="el" href="channels_8h-source.html#l00197">ucrec::uc_modes</a>.
108 <p>
109 <div class="fragment"><pre>00014 {
110 00015         <span class="comment">// the PROPER way to do it, AVOID bzero at *ALL* costs</span>
111 00016         strcpy(nick,<span class="stringliteral">""</span>);
112 00017         strcpy(ip,<span class="stringliteral">"127.0.0.1"</span>);
113 00018         <a class="code" href="classuserrec.html#m10">timeout</a> = 0;
114 00019         strcpy(ident,<span class="stringliteral">""</span>);
115 00020         strcpy(host,<span class="stringliteral">""</span>);
116 00021         strcpy(dhost,<span class="stringliteral">""</span>);
117 00022         strcpy(fullname,<span class="stringliteral">""</span>);
118 00023         strcpy(modes,<span class="stringliteral">""</span>);
119 00024         strcpy(inbuf,<span class="stringliteral">""</span>);
120 00025         strcpy(server,<span class="stringliteral">""</span>);
121 00026         strcpy(awaymsg,<span class="stringliteral">""</span>);
122 00027         <a class="code" href="classconnection.html#m0">fd</a> = <a class="code" href="classconnection.html#m12">lastping</a> = <a class="code" href="classconnection.html#m13">signon</a> = <a class="code" href="classconnection.html#m14">idle_lastmsg</a> = <a class="code" href="classconnection.html#m15">nping</a> = <a class="code" href="classconnection.html#m10">registered</a> = 0;
123 00028         <a class="code" href="classuserrec.html#m9">flood</a> = <a class="code" href="classconnection.html#m9">port</a> = <a class="code" href="classconnection.html#m4">bytes_in</a> = <a class="code" href="classconnection.html#m5">bytes_out</a> = <a class="code" href="classconnection.html#m6">cmds_in</a> = <a class="code" href="classconnection.html#m7">cmds_out</a> = 0;
124 00029         <a class="code" href="classconnection.html#m8">haspassed</a> = <span class="keyword">false</span>;
125 00030         strcpy(result,<span class="stringliteral">""</span>);
126 00031         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; MAXCHANS; i++)
127 00032         {
128 00033                 this-&gt;<a class="code" href="classuserrec.html#m5">chans</a>[i].<a class="code" href="classucrec.html#m1">channel</a> = NULL;
129 00034                 this-&gt;<a class="code" href="classuserrec.html#m5">chans</a>[i].<a class="code" href="classucrec.html#m0">uc_modes</a> = 0;
130 00035         }
131 00036         <a class="code" href="classuserrec.html#o0">invites</a>.clear();
132 00037 }
133 </pre></div>    </td>
134   </tr>
135 </table>
136 <a name="a1" doxytag="userrec::~userrec"></a><p>
137 <table width="100%" cellpadding="2" cellspacing="0" border="0">
138   <tr>
139     <td class="md">
140       <table cellpadding="0" cellspacing="0" border="0">
141         <tr>
142           <td class="md" nowrap valign="top"> virtual userrec::~userrec </td>
143           <td class="md" valign="top">(&nbsp;</td>
144           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
145           <td class="md" valign="top">)&nbsp;</td>
146           <td class="md" nowrap><code> [inline, virtual]</code></td>
147         </tr>
148
149       </table>
150     </td>
151   </tr>
152 </table>
153 <table cellspacing=5 cellpadding=0 border=0>
154   <tr>
155     <td>
156       &nbsp;
157     </td>
158     <td>
159
160 <p>
161
162 <p>
163 Definition at line <a class="el" href="users_8h-source.html#l00149">149</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
164 <p>
165 <div class="fragment"><pre>00149 {  }
166 </pre></div>    </td>
167   </tr>
168 </table>
169 <hr><h2>Member Function Documentation</h2>
170 <a name="a2" doxytag="userrec::GetFullHost"></a><p>
171 <table width="100%" cellpadding="2" cellspacing="0" border="0">
172   <tr>
173     <td class="md">
174       <table cellpadding="0" cellspacing="0" border="0">
175         <tr>
176           <td class="md" nowrap valign="top"> char * userrec::GetFullHost </td>
177           <td class="md" valign="top">(&nbsp;</td>
178           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
179           <td class="md" valign="top">)&nbsp;</td>
180           <td class="md" nowrap><code> [virtual]</code></td>
181         </tr>
182
183       </table>
184     </td>
185   </tr>
186 </table>
187 <table cellspacing=5 cellpadding=0 border=0>
188   <tr>
189     <td>
190       &nbsp;
191     </td>
192     <td>
193
194 <p>
195 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.
196 <p>
197
198 <p>
199 Definition at line <a class="el" href="users_8cpp-source.html#l00041">41</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
200 <p>
201 References <a class="el" href="users_8h-source.html#l00126">result</a>.
202 <p>
203 <div class="fragment"><pre>00042 {
204 00043         sprintf(result,<span class="stringliteral">"%s!%s@%s"</span>,nick,ident,dhost);
205 00044         <span class="keywordflow">return</span> <a class="code" href="classuserrec.html#m8">result</a>;
206 00045 }
207 </pre></div>    </td>
208   </tr>
209 </table>
210 <a name="a3" doxytag="userrec::GetFullRealHost"></a><p>
211 <table width="100%" cellpadding="2" cellspacing="0" border="0">
212   <tr>
213     <td class="md">
214       <table cellpadding="0" cellspacing="0" border="0">
215         <tr>
216           <td class="md" nowrap valign="top"> char * userrec::GetFullRealHost </td>
217           <td class="md" valign="top">(&nbsp;</td>
218           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
219           <td class="md" valign="top">)&nbsp;</td>
220           <td class="md" nowrap><code> [virtual]</code></td>
221         </tr>
222
223       </table>
224     </td>
225   </tr>
226 </table>
227 <table cellspacing=5 cellpadding=0 border=0>
228   <tr>
229     <td>
230       &nbsp;
231     </td>
232     <td>
233
234 <p>
235 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.
236 <p>
237 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.
238 <p>
239 Definition at line <a class="el" href="users_8cpp-source.html#l00048">48</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
240 <p>
241 References <a class="el" href="users_8h-source.html#l00126">result</a>.
242 <p>
243 <div class="fragment"><pre>00049 {
244 00050         sprintf(result,<span class="stringliteral">"%s!%s@%s"</span>,nick,ident,host);
245 00051         <span class="keywordflow">return</span> <a class="code" href="classuserrec.html#m8">result</a>;
246 00052 }
247 </pre></div>    </td>
248   </tr>
249 </table>
250 <a name="a7" doxytag="userrec::HasPermission"></a><p>
251 <table width="100%" cellpadding="2" cellspacing="0" border="0">
252   <tr>
253     <td class="md">
254       <table cellpadding="0" cellspacing="0" border="0">
255         <tr>
256           <td class="md" nowrap valign="top"> bool userrec::HasPermission </td>
257           <td class="md" valign="top">(&nbsp;</td>
258           <td class="md" nowrap valign="top">char *&nbsp;</td>
259           <td class="mdname1" valign="top" nowrap>&nbsp; <em>command</em>          </td>
260           <td class="md" valign="top">)&nbsp;</td>
261           <td class="md" nowrap></td>
262         </tr>
263
264       </table>
265     </td>
266   </tr>
267 </table>
268 <table cellspacing=5 cellpadding=0 border=0>
269   <tr>
270     <td>
271       &nbsp;
272     </td>
273     <td>
274
275 <p>
276 Returns true or false for if a user can execute a privilaged oper command.
277 <p>
278 This is done by looking up their oper type from <a class="el" href="classuserrec.html#m11">userrec::oper</a>, then referencing this to their oper classes and checking the commands they can execute.
279 <p>
280 Definition at line <a class="el" href="users_8cpp-source.html#l00097">97</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
281 <p>
282 <div class="fragment"><pre>00098 {
283 00099         <span class="keywordtype">char</span> TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
284 00100         <span class="keywordtype">char</span>* myclass;
285 00101         <span class="keywordtype">char</span>* mycmd;
286 00102         <span class="keywordtype">char</span>* savept;
287 00103         <span class="keywordtype">char</span>* savept2;
288 00104         
289 00105         <span class="comment">// are they even an oper at all?</span>
290 00106         <span class="keywordflow">if</span> (strchr(this-&gt;modes,<span class="charliteral">'o'</span>))
291 00107         {
292 00108                 log(DEBUG,<span class="stringliteral">"*** HasPermission: %s is an oper"</span>,this-&gt;nick);
293 00109                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j =0; j &lt; ConfValueEnum(<span class="stringliteral">"type"</span>,&amp;config_f); j++)
294 00110                 {
295 00111                         ConfValue(<span class="stringliteral">"type"</span>,<span class="stringliteral">"name"</span>,j,TypeName,&amp;config_f);
296 00112                         <span class="keywordflow">if</span> (!strcmp(TypeName,this-&gt;oper))
297 00113                         {
298 00114                                 log(DEBUG,<span class="stringliteral">"*** HasPermission: %s is an oper of type '%s'"</span>,this-&gt;nick,this-&gt;oper);
299 00115                                 ConfValue(<span class="stringliteral">"type"</span>,<span class="stringliteral">"classes"</span>,j,Classes,&amp;config_f);
300 00116                                 <span class="keywordtype">char</span>* myclass = strtok_r(Classes,<span class="stringliteral">" "</span>,&amp;savept);
301 00117                                 <span class="keywordflow">while</span> (myclass)
302 00118                                 {
303 00119                                         log(DEBUG,<span class="stringliteral">"*** HasPermission: checking classtype '%s'"</span>,myclass);
304 00120                                         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k =0; k &lt; ConfValueEnum(<span class="stringliteral">"class"</span>,&amp;config_f); k++)
305 00121                                         {
306 00122                                                 ConfValue(<span class="stringliteral">"class"</span>,<span class="stringliteral">"name"</span>,k,ClassName,&amp;config_f);
307 00123                                                 <span class="keywordflow">if</span> (!strcmp(ClassName,myclass))
308 00124                                                 {
309 00125                                                         ConfValue(<span class="stringliteral">"class"</span>,<span class="stringliteral">"commands"</span>,k,CommandList,&amp;config_f);
310 00126                                                         log(DEBUG,<span class="stringliteral">"*** HasPermission: found class named %s with commands: '%s'"</span>,ClassName,CommandList);
311 00127                                                         
312 00128                                                         
313 00129                                                         mycmd = strtok_r(CommandList,<span class="stringliteral">" "</span>,&amp;savept2);
314 00130                                                         <span class="keywordflow">while</span> (mycmd)
315 00131                                                         {
316 00132                                                                 <span class="keywordflow">if</span> (!strcasecmp(mycmd,command))
317 00133                                                                 {
318 00134                                                                         log(DEBUG,<span class="stringliteral">"*** Command %s found, returning true"</span>,command);
319 00135                                                                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
320 00136                                                                 }
321 00137                                                                 mycmd = strtok_r(NULL,<span class="stringliteral">" "</span>,&amp;savept2);
322 00138                                                         }
323 00139                                                 }
324 00140                                         }
325 00141                                         myclass = strtok_r(NULL,<span class="stringliteral">" "</span>,&amp;savept);
326 00142                                 }
327 00143                         }
328 00144                 }
329 00145         }
330 00146         <span class="keywordflow">return</span> <span class="keyword">false</span>;
331 00147 }
332 </pre></div>    </td>
333   </tr>
334 </table>
335 <a name="a5" doxytag="userrec::InviteTo"></a><p>
336 <table width="100%" cellpadding="2" cellspacing="0" border="0">
337   <tr>
338     <td class="md">
339       <table cellpadding="0" cellspacing="0" border="0">
340         <tr>
341           <td class="md" nowrap valign="top"> void userrec::InviteTo </td>
342           <td class="md" valign="top">(&nbsp;</td>
343           <td class="md" nowrap valign="top">char *&nbsp;</td>
344           <td class="mdname1" valign="top" nowrap>&nbsp; <em>channel</em>          </td>
345           <td class="md" valign="top">)&nbsp;</td>
346           <td class="md" nowrap><code> [virtual]</code></td>
347         </tr>
348
349       </table>
350     </td>
351   </tr>
352 </table>
353 <table cellspacing=5 cellpadding=0 border=0>
354   <tr>
355     <td>
356       &nbsp;
357     </td>
358     <td>
359
360 <p>
361 Adds a channel to a users invite list (invites them to a channel).
362 <p>
363
364 <p>
365 Definition at line <a class="el" href="users_8cpp-source.html#l00068">68</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
366 <p>
367 References <a class="el" href="users_8h-source.html#l00028">Invited::channel</a>, and <a class="el" href="users_8h-source.html#l00084">invites</a>.
368 <p>
369 <div class="fragment"><pre>00069 {
370 00070         <a class="code" href="classInvited.html">Invited</a> i;
371 00071         strcpy(i.<a class="code" href="classInvited.html#m0">channel</a>,channel);
372 00072         <a class="code" href="classuserrec.html#o0">invites</a>.push_back(i);
373 00073 }
374 </pre></div>    </td>
375   </tr>
376 </table>
377 <a name="a4" doxytag="userrec::IsInvited"></a><p>
378 <table width="100%" cellpadding="2" cellspacing="0" border="0">
379   <tr>
380     <td class="md">
381       <table cellpadding="0" cellspacing="0" border="0">
382         <tr>
383           <td class="md" nowrap valign="top"> bool userrec::IsInvited </td>
384           <td class="md" valign="top">(&nbsp;</td>
385           <td class="md" nowrap valign="top">char *&nbsp;</td>
386           <td class="mdname1" valign="top" nowrap>&nbsp; <em>channel</em>          </td>
387           <td class="md" valign="top">)&nbsp;</td>
388           <td class="md" nowrap><code> [virtual]</code></td>
389         </tr>
390
391       </table>
392     </td>
393   </tr>
394 </table>
395 <table cellspacing=5 cellpadding=0 border=0>
396   <tr>
397     <td>
398       &nbsp;
399     </td>
400     <td>
401
402 <p>
403 Returns true if a user is invited to a channel.
404 <p>
405
406 <p>
407 Definition at line <a class="el" href="users_8cpp-source.html#l00054">54</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
408 <p>
409 References <a class="el" href="users_8h-source.html#l00084">invites</a>.
410 <p>
411 <div class="fragment"><pre>00055 {
412 00056         <span class="keywordflow">for</span> (InvitedList::iterator i = <a class="code" href="classuserrec.html#o0">invites</a>.begin(); i != <a class="code" href="classuserrec.html#o0">invites</a>.end(); i++)
413 00057         {
414 00058                 <span class="keywordflow">if</span> (i-&gt;channel) {
415 00059                         <span class="keywordflow">if</span> (!strcasecmp(i-&gt;channel,channel))
416 00060                         {
417 00061                                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
418 00062                         }
419 00063                 }
420 00064         }
421 00065         <span class="keywordflow">return</span> <span class="keyword">false</span>;
422 00066 }
423 </pre></div>    </td>
424   </tr>
425 </table>
426 <a name="a6" doxytag="userrec::RemoveInvite"></a><p>
427 <table width="100%" cellpadding="2" cellspacing="0" border="0">
428   <tr>
429     <td class="md">
430       <table cellpadding="0" cellspacing="0" border="0">
431         <tr>
432           <td class="md" nowrap valign="top"> void userrec::RemoveInvite </td>
433           <td class="md" valign="top">(&nbsp;</td>
434           <td class="md" nowrap valign="top">char *&nbsp;</td>
435           <td class="mdname1" valign="top" nowrap>&nbsp; <em>channel</em>          </td>
436           <td class="md" valign="top">)&nbsp;</td>
437           <td class="md" nowrap><code> [virtual]</code></td>
438         </tr>
439
440       </table>
441     </td>
442   </tr>
443 </table>
444 <table cellspacing=5 cellpadding=0 border=0>
445   <tr>
446     <td>
447       &nbsp;
448     </td>
449     <td>
450
451 <p>
452 Removes a channel from a users invite list.
453 <p>
454 This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.
455 <p>
456 Definition at line <a class="el" href="users_8cpp-source.html#l00075">75</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
457 <p>
458 References <a class="el" href="users_8h-source.html#l00084">invites</a>.
459 <p>
460 <div class="fragment"><pre>00076 {
461 00077         log(DEBUG,<span class="stringliteral">"Removing invites"</span>);
462 00078         <span class="keywordflow">if</span> (channel)
463 00079         {
464 00080                 <span class="keywordflow">if</span> (<a class="code" href="classuserrec.html#o0">invites</a>.size())
465 00081                 {
466 00082                         <span class="keywordflow">for</span> (InvitedList::iterator i = <a class="code" href="classuserrec.html#o0">invites</a>.begin(); i != <a class="code" href="classuserrec.html#o0">invites</a>.end(); i++)
467 00083                         {
468 00084                                 <span class="keywordflow">if</span> (i-&gt;channel)
469 00085                                 {
470 00086                                         <span class="keywordflow">if</span> (!strcasecmp(i-&gt;channel,channel))
471 00087                                         {
472 00088                                                 <a class="code" href="classuserrec.html#o0">invites</a>.erase(i);
473 00089                                                 <span class="keywordflow">return</span>;
474 00090                                         }
475 00091                                 }
476 00092                         }
477 00093                 }
478 00094         }
479 00095 }
480 </pre></div>    </td>
481   </tr>
482 </table>
483 <hr><h2>Member Data Documentation</h2>
484 <a name="m7" doxytag="userrec::awaymsg"></a><p>
485 <table width="100%" cellpadding="2" cellspacing="0" border="0">
486   <tr>
487     <td class="md">
488       <table cellpadding="0" cellspacing="0" border="0">
489         <tr>
490           <td class="md" nowrap valign="top"> char userrec::awaymsg[512]
491       </table>
492     </td>
493   </tr>
494 </table>
495 <table cellspacing=5 cellpadding=0 border=0>
496   <tr>
497     <td>
498       &nbsp;
499     </td>
500     <td>
501
502 <p>
503 The user's away message.
504 <p>
505 If this string is empty, the user is not marked as away.
506 <p>
507 Definition at line <a class="el" href="users_8h-source.html#l00121">121</a> of file <a class="el" href="users_8h-source.html">users.h</a>.    </td>
508   </tr>
509 </table>
510 <a name="m5" doxytag="userrec::chans"></a><p>
511 <table width="100%" cellpadding="2" cellspacing="0" border="0">
512   <tr>
513     <td class="md">
514       <table cellpadding="0" cellspacing="0" border="0">
515         <tr>
516           <td class="md" nowrap valign="top"> <a class="el" href="classucrec.html">ucrec</a> userrec::chans[MAXCHANS]
517       </table>
518     </td>
519   </tr>
520 </table>
521 <table cellspacing=5 cellpadding=0 border=0>
522   <tr>
523     <td>
524       &nbsp;
525     </td>
526     <td>
527
528 <p>
529
530 <p>
531 Definition at line <a class="el" href="users_8h-source.html#l00112">112</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
532 <p>
533 Referenced by <a class="el" href="users_8cpp-source.html#l00013">userrec()</a>.    </td>
534   </tr>
535 </table>
536 <a name="m2" doxytag="userrec::dhost"></a><p>
537 <table width="100%" cellpadding="2" cellspacing="0" border="0">
538   <tr>
539     <td class="md">
540       <table cellpadding="0" cellspacing="0" border="0">
541         <tr>
542           <td class="md" nowrap valign="top"> char userrec::dhost[256]
543       </table>
544     </td>
545   </tr>
546 </table>
547 <table cellspacing=5 cellpadding=0 border=0>
548   <tr>
549     <td>
550       &nbsp;
551     </td>
552     <td>
553
554 <p>
555 The host displayed to non-opers (used for cloaking etc).
556 <p>
557 This usually matches the value of <a class="el" href="classconnection.html#m1">userrec::host</a>.
558 <p>
559 Definition at line <a class="el" href="users_8h-source.html#l00100">100</a> of file <a class="el" href="users_8h-source.html">users.h</a>.    </td>
560   </tr>
561 </table>
562 <a name="m9" doxytag="userrec::flood"></a><p>
563 <table width="100%" cellpadding="2" cellspacing="0" border="0">
564   <tr>
565     <td class="md">
566       <table cellpadding="0" cellspacing="0" border="0">
567         <tr>
568           <td class="md" nowrap valign="top"> int userrec::flood
569       </table>
570     </td>
571   </tr>
572 </table>
573 <table cellspacing=5 cellpadding=0 border=0>
574   <tr>
575     <td>
576       &nbsp;
577     </td>
578     <td>
579
580 <p>
581 Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood.
582 <p>
583
584 <p>
585 Definition at line <a class="el" href="users_8h-source.html#l00132">132</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
586 <p>
587 Referenced by <a class="el" href="users_8cpp-source.html#l00013">userrec()</a>.    </td>
588   </tr>
589 </table>
590 <a name="m3" doxytag="userrec::fullname"></a><p>
591 <table width="100%" cellpadding="2" cellspacing="0" border="0">
592   <tr>
593     <td class="md">
594       <table cellpadding="0" cellspacing="0" border="0">
595         <tr>
596           <td class="md" nowrap valign="top"> char userrec::fullname[128]
597       </table>
598     </td>
599   </tr>
600 </table>
601 <table cellspacing=5 cellpadding=0 border=0>
602   <tr>
603     <td>
604       &nbsp;
605     </td>
606     <td>
607
608 <p>
609 The users full name.
610 <p>
611
612 <p>
613 Definition at line <a class="el" href="users_8h-source.html#l00104">104</a> of file <a class="el" href="users_8h-source.html">users.h</a>.    </td>
614   </tr>
615 </table>
616 <a name="m1" doxytag="userrec::ident"></a><p>
617 <table width="100%" cellpadding="2" cellspacing="0" border="0">
618   <tr>
619     <td class="md">
620       <table cellpadding="0" cellspacing="0" border="0">
621         <tr>
622           <td class="md" nowrap valign="top"> char userrec::ident[64]
623       </table>
624     </td>
625   </tr>
626 </table>
627 <table cellspacing=5 cellpadding=0 border=0>
628   <tr>
629     <td>
630       &nbsp;
631     </td>
632     <td>
633
634 <p>
635 The users ident reply.
636 <p>
637
638 <p>
639 Definition at line <a class="el" href="users_8h-source.html#l00095">95</a> of file <a class="el" href="users_8h-source.html">users.h</a>.    </td>
640   </tr>
641 </table>
642 <a name="o0" doxytag="userrec::invites"></a><p>
643 <table width="100%" cellpadding="2" cellspacing="0" border="0">
644   <tr>
645     <td class="md">
646       <table cellpadding="0" cellspacing="0" border="0">
647         <tr>
648           <td class="md" nowrap valign="top"> <a class="el" href="users_8h.html#a6">InvitedList</a> userrec::invites<code> [private]</code>
649       </table>
650     </td>
651   </tr>
652 </table>
653 <table cellspacing=5 cellpadding=0 border=0>
654   <tr>
655     <td>
656       &nbsp;
657     </td>
658     <td>
659
660 <p>
661 A list of channels the user has a pending invite to.
662 <p>
663
664 <p>
665 Definition at line <a class="el" href="users_8h-source.html#l00084">84</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
666 <p>
667 Referenced by <a class="el" href="users_8cpp-source.html#l00068">InviteTo()</a>, <a class="el" href="users_8cpp-source.html#l00054">IsInvited()</a>, <a class="el" href="users_8cpp-source.html#l00075">RemoveInvite()</a>, and <a class="el" href="users_8cpp-source.html#l00013">userrec()</a>.    </td>
668   </tr>
669 </table>
670 <a name="m4" doxytag="userrec::modes"></a><p>
671 <table width="100%" cellpadding="2" cellspacing="0" border="0">
672   <tr>
673     <td class="md">
674       <table cellpadding="0" cellspacing="0" border="0">
675         <tr>
676           <td class="md" nowrap valign="top"> char userrec::modes[MAXBUF]
677       </table>
678     </td>
679   </tr>
680 </table>
681 <table cellspacing=5 cellpadding=0 border=0>
682   <tr>
683     <td>
684       &nbsp;
685     </td>
686     <td>
687
688 <p>
689 The user's mode string.
690 <p>
691 This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit.
692 <p>
693 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>.    </td>
694   </tr>
695 </table>
696 <a name="m0" doxytag="userrec::nick"></a><p>
697 <table width="100%" cellpadding="2" cellspacing="0" border="0">
698   <tr>
699     <td class="md">
700       <table cellpadding="0" cellspacing="0" border="0">
701         <tr>
702           <td class="md" nowrap valign="top"> char userrec::nick[NICKMAX]
703       </table>
704     </td>
705   </tr>
706 </table>
707 <table cellspacing=5 cellpadding=0 border=0>
708   <tr>
709     <td>
710       &nbsp;
711     </td>
712     <td>
713
714 <p>
715 The users nickname.
716 <p>
717 An invalid nickname indicates an unregistered connection prior to the NICK command.
718 <p>
719 Definition at line <a class="el" href="users_8h-source.html#l00091">91</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
720 <p>
721 Referenced by <a class="el" href="modules_8cpp-source.html#l00373">Server::QuitUser()</a>.    </td>
722   </tr>
723 </table>
724 <a name="m11" doxytag="userrec::oper"></a><p>
725 <table width="100%" cellpadding="2" cellspacing="0" border="0">
726   <tr>
727     <td class="md">
728       <table cellpadding="0" cellspacing="0" border="0">
729         <tr>
730           <td class="md" nowrap valign="top"> char userrec::oper[NICKMAX]
731       </table>
732     </td>
733   </tr>
734 </table>
735 <table cellspacing=5 cellpadding=0 border=0>
736   <tr>
737     <td>
738       &nbsp;
739     </td>
740     <td>
741
742 <p>
743 The oper type they logged in as, if they are an oper.
744 <p>
745 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.
746 <p>
747 Definition at line <a class="el" href="users_8h-source.html#l00145">145</a> of file <a class="el" href="users_8h-source.html">users.h</a>.    </td>
748   </tr>
749 </table>
750 <a name="m8" doxytag="userrec::result"></a><p>
751 <table width="100%" cellpadding="2" cellspacing="0" border="0">
752   <tr>
753     <td class="md">
754       <table cellpadding="0" cellspacing="0" border="0">
755         <tr>
756           <td class="md" nowrap valign="top"> char userrec::result[256]
757       </table>
758     </td>
759   </tr>
760 </table>
761 <table cellspacing=5 cellpadding=0 border=0>
762   <tr>
763     <td>
764       &nbsp;
765     </td>
766     <td>
767
768 <p>
769 Stores the result of the last GetFullHost or GetRealHost call.
770 <p>
771 You may use this to increase the speed of use of this class.
772 <p>
773 Definition at line <a class="el" href="users_8h-source.html#l00126">126</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
774 <p>
775 Referenced by <a class="el" href="users_8cpp-source.html#l00041">GetFullHost()</a>, and <a class="el" href="users_8cpp-source.html#l00048">GetFullRealHost()</a>.    </td>
776   </tr>
777 </table>
778 <a name="m6" doxytag="userrec::server"></a><p>
779 <table width="100%" cellpadding="2" cellspacing="0" border="0">
780   <tr>
781     <td class="md">
782       <table cellpadding="0" cellspacing="0" border="0">
783         <tr>
784           <td class="md" nowrap valign="top"> char userrec::server[256]
785       </table>
786     </td>
787   </tr>
788 </table>
789 <table cellspacing=5 cellpadding=0 border=0>
790   <tr>
791     <td>
792       &nbsp;
793     </td>
794     <td>
795
796 <p>
797 The server the user is connected to.
798 <p>
799
800 <p>
801 Definition at line <a class="el" href="users_8h-source.html#l00116">116</a> of file <a class="el" href="users_8h-source.html">users.h</a>.    </td>
802   </tr>
803 </table>
804 <a name="m10" doxytag="userrec::timeout"></a><p>
805 <table width="100%" cellpadding="2" cellspacing="0" border="0">
806   <tr>
807     <td class="md">
808       <table cellpadding="0" cellspacing="0" border="0">
809         <tr>
810           <td class="md" nowrap valign="top"> unsigned long userrec::timeout
811       </table>
812     </td>
813   </tr>
814 </table>
815 <table cellspacing=5 cellpadding=0 border=0>
816   <tr>
817     <td>
818       &nbsp;
819     </td>
820     <td>
821
822 <p>
823 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.
824 <p>
825
826 <p>
827 Definition at line <a class="el" href="users_8h-source.html#l00138">138</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
828 <p>
829 Referenced by <a class="el" href="users_8cpp-source.html#l00013">userrec()</a>.    </td>
830   </tr>
831 </table>
832 <hr>The documentation for this class was generated from the following files:<ul>
833 <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>
834 <hr><address style="align: right;"><small>Generated on Sat May 1 20:58:16 2004 for InspIRCd by
835 <a href="http://www.doxygen.org/index.html">
836 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
837 width=110 height=53></a>1.3-rc3 </small></address>
838 </body>
839 </html>