]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classuserrec.html
Added base.cpp, fixed documentation for userrec::HasPermission
[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>virtual 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><code> [virtual]</code></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="comment">//myclass = savept;</span>
302 00118                                 <span class="keywordflow">while</span> (myclass)
303 00119                                 {
304 00120                                         log(DEBUG,<span class="stringliteral">"*** HasPermission: checking classtype '%s'"</span>,myclass);
305 00121                                         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k =0; k &lt; ConfValueEnum(<span class="stringliteral">"class"</span>,&amp;config_f); k++)
306 00122                                         {
307 00123                                                 ConfValue(<span class="stringliteral">"class"</span>,<span class="stringliteral">"name"</span>,k,ClassName,&amp;config_f);
308 00124                                                 <span class="keywordflow">if</span> (!strcmp(ClassName,myclass))
309 00125                                                 {
310 00126                                                         ConfValue(<span class="stringliteral">"class"</span>,<span class="stringliteral">"commands"</span>,k,CommandList,&amp;config_f);
311 00127                                                         log(DEBUG,<span class="stringliteral">"*** HasPermission: found class named %s with commands: '%s'"</span>,ClassName,CommandList);
312 00128                                                         
313 00129                                                         
314 00130                                                         mycmd = strtok_r(CommandList,<span class="stringliteral">" "</span>,&amp;savept2);
315 00131                                                         <span class="comment">//mycmd = savept2;</span>
316 00132                                                         <span class="keywordflow">while</span> (mycmd)
317 00133                                                         {
318 00134                                                                 <span class="keywordflow">if</span> (!strcasecmp(mycmd,command))
319 00135                                                                 {
320 00136                                                                         log(DEBUG,<span class="stringliteral">"*** Command %s found, returning true"</span>,command);
321 00137                                                                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
322 00138                                                                 }
323 00139                                                                 mycmd = strtok_r(NULL,<span class="stringliteral">" "</span>,&amp;savept2);
324 00140                                                                 <span class="comment">//mycmd = savept2;</span>
325 00141                                                         }
326 00142                                                 }
327 00143                                         }
328 00144                                         myclass = strtok_r(NULL,<span class="stringliteral">" "</span>,&amp;savept);
329 00145                                         <span class="comment">//myclass = savept;</span>
330 00146                                 }
331 00147                         }
332 00148                 }
333 00149         }
334 00150         <span class="keywordflow">return</span> <span class="keyword">false</span>;
335 00151 }
336 </pre></div>    </td>
337   </tr>
338 </table>
339 <a name="a5" doxytag="userrec::InviteTo"></a><p>
340 <table width="100%" cellpadding="2" cellspacing="0" border="0">
341   <tr>
342     <td class="md">
343       <table cellpadding="0" cellspacing="0" border="0">
344         <tr>
345           <td class="md" nowrap valign="top"> void userrec::InviteTo </td>
346           <td class="md" valign="top">(&nbsp;</td>
347           <td class="md" nowrap valign="top">char *&nbsp;</td>
348           <td class="mdname1" valign="top" nowrap>&nbsp; <em>channel</em>          </td>
349           <td class="md" valign="top">)&nbsp;</td>
350           <td class="md" nowrap><code> [virtual]</code></td>
351         </tr>
352
353       </table>
354     </td>
355   </tr>
356 </table>
357 <table cellspacing=5 cellpadding=0 border=0>
358   <tr>
359     <td>
360       &nbsp;
361     </td>
362     <td>
363
364 <p>
365 Adds a channel to a users invite list (invites them to a channel).
366 <p>
367
368 <p>
369 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>.
370 <p>
371 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>.
372 <p>
373 <div class="fragment"><pre>00069 {
374 00070         <a class="code" href="classInvited.html">Invited</a> i;
375 00071         strcpy(i.<a class="code" href="classInvited.html#m0">channel</a>,channel);
376 00072         <a class="code" href="classuserrec.html#o0">invites</a>.push_back(i);
377 00073 }
378 </pre></div>    </td>
379   </tr>
380 </table>
381 <a name="a4" doxytag="userrec::IsInvited"></a><p>
382 <table width="100%" cellpadding="2" cellspacing="0" border="0">
383   <tr>
384     <td class="md">
385       <table cellpadding="0" cellspacing="0" border="0">
386         <tr>
387           <td class="md" nowrap valign="top"> bool userrec::IsInvited </td>
388           <td class="md" valign="top">(&nbsp;</td>
389           <td class="md" nowrap valign="top">char *&nbsp;</td>
390           <td class="mdname1" valign="top" nowrap>&nbsp; <em>channel</em>          </td>
391           <td class="md" valign="top">)&nbsp;</td>
392           <td class="md" nowrap><code> [virtual]</code></td>
393         </tr>
394
395       </table>
396     </td>
397   </tr>
398 </table>
399 <table cellspacing=5 cellpadding=0 border=0>
400   <tr>
401     <td>
402       &nbsp;
403     </td>
404     <td>
405
406 <p>
407 Returns true if a user is invited to a channel.
408 <p>
409
410 <p>
411 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>.
412 <p>
413 References <a class="el" href="users_8h-source.html#l00084">invites</a>.
414 <p>
415 <div class="fragment"><pre>00055 {
416 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++)
417 00057         {
418 00058                 <span class="keywordflow">if</span> (i-&gt;channel) {
419 00059                         <span class="keywordflow">if</span> (!strcasecmp(i-&gt;channel,channel))
420 00060                         {
421 00061                                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
422 00062                         }
423 00063                 }
424 00064         }
425 00065         <span class="keywordflow">return</span> <span class="keyword">false</span>;
426 00066 }
427 </pre></div>    </td>
428   </tr>
429 </table>
430 <a name="a6" doxytag="userrec::RemoveInvite"></a><p>
431 <table width="100%" cellpadding="2" cellspacing="0" border="0">
432   <tr>
433     <td class="md">
434       <table cellpadding="0" cellspacing="0" border="0">
435         <tr>
436           <td class="md" nowrap valign="top"> void userrec::RemoveInvite </td>
437           <td class="md" valign="top">(&nbsp;</td>
438           <td class="md" nowrap valign="top">char *&nbsp;</td>
439           <td class="mdname1" valign="top" nowrap>&nbsp; <em>channel</em>          </td>
440           <td class="md" valign="top">)&nbsp;</td>
441           <td class="md" nowrap><code> [virtual]</code></td>
442         </tr>
443
444       </table>
445     </td>
446   </tr>
447 </table>
448 <table cellspacing=5 cellpadding=0 border=0>
449   <tr>
450     <td>
451       &nbsp;
452     </td>
453     <td>
454
455 <p>
456 Removes a channel from a users invite list.
457 <p>
458 This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.
459 <p>
460 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>.
461 <p>
462 References <a class="el" href="users_8h-source.html#l00084">invites</a>.
463 <p>
464 <div class="fragment"><pre>00076 {
465 00077         log(DEBUG,<span class="stringliteral">"Removing invites"</span>);
466 00078         <span class="keywordflow">if</span> (channel)
467 00079         {
468 00080                 <span class="keywordflow">if</span> (<a class="code" href="classuserrec.html#o0">invites</a>.size())
469 00081                 {
470 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++)
471 00083                         {
472 00084                                 <span class="keywordflow">if</span> (i-&gt;channel)
473 00085                                 {
474 00086                                         <span class="keywordflow">if</span> (!strcasecmp(i-&gt;channel,channel))
475 00087                                         {
476 00088                                                 <a class="code" href="classuserrec.html#o0">invites</a>.erase(i);
477 00089                                                 <span class="keywordflow">return</span>;
478 00090                                         }
479 00091                                 }
480 00092                         }
481 00093                 }
482 00094         }
483 00095 }
484 </pre></div>    </td>
485   </tr>
486 </table>
487 <hr><h2>Member Data Documentation</h2>
488 <a name="m7" doxytag="userrec::awaymsg"></a><p>
489 <table width="100%" cellpadding="2" cellspacing="0" border="0">
490   <tr>
491     <td class="md">
492       <table cellpadding="0" cellspacing="0" border="0">
493         <tr>
494           <td class="md" nowrap valign="top"> char userrec::awaymsg[512]
495       </table>
496     </td>
497   </tr>
498 </table>
499 <table cellspacing=5 cellpadding=0 border=0>
500   <tr>
501     <td>
502       &nbsp;
503     </td>
504     <td>
505
506 <p>
507 The user's away message.
508 <p>
509 If this string is empty, the user is not marked as away.
510 <p>
511 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>
512   </tr>
513 </table>
514 <a name="m5" doxytag="userrec::chans"></a><p>
515 <table width="100%" cellpadding="2" cellspacing="0" border="0">
516   <tr>
517     <td class="md">
518       <table cellpadding="0" cellspacing="0" border="0">
519         <tr>
520           <td class="md" nowrap valign="top"> <a class="el" href="classucrec.html">ucrec</a> userrec::chans[MAXCHANS]
521       </table>
522     </td>
523   </tr>
524 </table>
525 <table cellspacing=5 cellpadding=0 border=0>
526   <tr>
527     <td>
528       &nbsp;
529     </td>
530     <td>
531
532 <p>
533
534 <p>
535 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>.
536 <p>
537 Referenced by <a class="el" href="users_8cpp-source.html#l00013">userrec()</a>.    </td>
538   </tr>
539 </table>
540 <a name="m2" doxytag="userrec::dhost"></a><p>
541 <table width="100%" cellpadding="2" cellspacing="0" border="0">
542   <tr>
543     <td class="md">
544       <table cellpadding="0" cellspacing="0" border="0">
545         <tr>
546           <td class="md" nowrap valign="top"> char userrec::dhost[256]
547       </table>
548     </td>
549   </tr>
550 </table>
551 <table cellspacing=5 cellpadding=0 border=0>
552   <tr>
553     <td>
554       &nbsp;
555     </td>
556     <td>
557
558 <p>
559 The host displayed to non-opers (used for cloaking etc).
560 <p>
561 This usually matches the value of <a class="el" href="classconnection.html#m1">userrec::host</a>.
562 <p>
563 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>
564   </tr>
565 </table>
566 <a name="m9" doxytag="userrec::flood"></a><p>
567 <table width="100%" cellpadding="2" cellspacing="0" border="0">
568   <tr>
569     <td class="md">
570       <table cellpadding="0" cellspacing="0" border="0">
571         <tr>
572           <td class="md" nowrap valign="top"> int userrec::flood
573       </table>
574     </td>
575   </tr>
576 </table>
577 <table cellspacing=5 cellpadding=0 border=0>
578   <tr>
579     <td>
580       &nbsp;
581     </td>
582     <td>
583
584 <p>
585 Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood.
586 <p>
587
588 <p>
589 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>.
590 <p>
591 Referenced by <a class="el" href="users_8cpp-source.html#l00013">userrec()</a>.    </td>
592   </tr>
593 </table>
594 <a name="m3" doxytag="userrec::fullname"></a><p>
595 <table width="100%" cellpadding="2" cellspacing="0" border="0">
596   <tr>
597     <td class="md">
598       <table cellpadding="0" cellspacing="0" border="0">
599         <tr>
600           <td class="md" nowrap valign="top"> char userrec::fullname[128]
601       </table>
602     </td>
603   </tr>
604 </table>
605 <table cellspacing=5 cellpadding=0 border=0>
606   <tr>
607     <td>
608       &nbsp;
609     </td>
610     <td>
611
612 <p>
613 The users full name.
614 <p>
615
616 <p>
617 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>
618   </tr>
619 </table>
620 <a name="m1" doxytag="userrec::ident"></a><p>
621 <table width="100%" cellpadding="2" cellspacing="0" border="0">
622   <tr>
623     <td class="md">
624       <table cellpadding="0" cellspacing="0" border="0">
625         <tr>
626           <td class="md" nowrap valign="top"> char userrec::ident[64]
627       </table>
628     </td>
629   </tr>
630 </table>
631 <table cellspacing=5 cellpadding=0 border=0>
632   <tr>
633     <td>
634       &nbsp;
635     </td>
636     <td>
637
638 <p>
639 The users ident reply.
640 <p>
641
642 <p>
643 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>
644   </tr>
645 </table>
646 <a name="o0" doxytag="userrec::invites"></a><p>
647 <table width="100%" cellpadding="2" cellspacing="0" border="0">
648   <tr>
649     <td class="md">
650       <table cellpadding="0" cellspacing="0" border="0">
651         <tr>
652           <td class="md" nowrap valign="top"> <a class="el" href="users_8h.html#a6">InvitedList</a> userrec::invites<code> [private]</code>
653       </table>
654     </td>
655   </tr>
656 </table>
657 <table cellspacing=5 cellpadding=0 border=0>
658   <tr>
659     <td>
660       &nbsp;
661     </td>
662     <td>
663
664 <p>
665 A list of channels the user has a pending invite to.
666 <p>
667
668 <p>
669 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>.
670 <p>
671 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>
672   </tr>
673 </table>
674 <a name="m4" doxytag="userrec::modes"></a><p>
675 <table width="100%" cellpadding="2" cellspacing="0" border="0">
676   <tr>
677     <td class="md">
678       <table cellpadding="0" cellspacing="0" border="0">
679         <tr>
680           <td class="md" nowrap valign="top"> char userrec::modes[MAXBUF]
681       </table>
682     </td>
683   </tr>
684 </table>
685 <table cellspacing=5 cellpadding=0 border=0>
686   <tr>
687     <td>
688       &nbsp;
689     </td>
690     <td>
691
692 <p>
693 The user's mode string.
694 <p>
695 This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit.
696 <p>
697 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>
698   </tr>
699 </table>
700 <a name="m0" doxytag="userrec::nick"></a><p>
701 <table width="100%" cellpadding="2" cellspacing="0" border="0">
702   <tr>
703     <td class="md">
704       <table cellpadding="0" cellspacing="0" border="0">
705         <tr>
706           <td class="md" nowrap valign="top"> char userrec::nick[NICKMAX]
707       </table>
708     </td>
709   </tr>
710 </table>
711 <table cellspacing=5 cellpadding=0 border=0>
712   <tr>
713     <td>
714       &nbsp;
715     </td>
716     <td>
717
718 <p>
719 The users nickname.
720 <p>
721 An invalid nickname indicates an unregistered connection prior to the NICK command.
722 <p>
723 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>.
724 <p>
725 Referenced by <a class="el" href="modules_8cpp-source.html#l00176">Server::QuitUser()</a>.    </td>
726   </tr>
727 </table>
728 <a name="m11" doxytag="userrec::oper"></a><p>
729 <table width="100%" cellpadding="2" cellspacing="0" border="0">
730   <tr>
731     <td class="md">
732       <table cellpadding="0" cellspacing="0" border="0">
733         <tr>
734           <td class="md" nowrap valign="top"> char userrec::oper[NICKMAX]
735       </table>
736     </td>
737   </tr>
738 </table>
739 <table cellspacing=5 cellpadding=0 border=0>
740   <tr>
741     <td>
742       &nbsp;
743     </td>
744     <td>
745
746 <p>
747 The oper type they logged in as, if they are an oper.
748 <p>
749 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.
750 <p>
751 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>
752   </tr>
753 </table>
754 <a name="m8" doxytag="userrec::result"></a><p>
755 <table width="100%" cellpadding="2" cellspacing="0" border="0">
756   <tr>
757     <td class="md">
758       <table cellpadding="0" cellspacing="0" border="0">
759         <tr>
760           <td class="md" nowrap valign="top"> char userrec::result[256]
761       </table>
762     </td>
763   </tr>
764 </table>
765 <table cellspacing=5 cellpadding=0 border=0>
766   <tr>
767     <td>
768       &nbsp;
769     </td>
770     <td>
771
772 <p>
773 Stores the result of the last GetFullHost or GetRealHost call.
774 <p>
775 You may use this to increase the speed of use of this class.
776 <p>
777 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>.
778 <p>
779 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>
780   </tr>
781 </table>
782 <a name="m6" doxytag="userrec::server"></a><p>
783 <table width="100%" cellpadding="2" cellspacing="0" border="0">
784   <tr>
785     <td class="md">
786       <table cellpadding="0" cellspacing="0" border="0">
787         <tr>
788           <td class="md" nowrap valign="top"> char userrec::server[256]
789       </table>
790     </td>
791   </tr>
792 </table>
793 <table cellspacing=5 cellpadding=0 border=0>
794   <tr>
795     <td>
796       &nbsp;
797     </td>
798     <td>
799
800 <p>
801 The server the user is connected to.
802 <p>
803
804 <p>
805 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>
806   </tr>
807 </table>
808 <a name="m10" doxytag="userrec::timeout"></a><p>
809 <table width="100%" cellpadding="2" cellspacing="0" border="0">
810   <tr>
811     <td class="md">
812       <table cellpadding="0" cellspacing="0" border="0">
813         <tr>
814           <td class="md" nowrap valign="top"> unsigned long userrec::timeout
815       </table>
816     </td>
817   </tr>
818 </table>
819 <table cellspacing=5 cellpadding=0 border=0>
820   <tr>
821     <td>
822       &nbsp;
823     </td>
824     <td>
825
826 <p>
827 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.
828 <p>
829
830 <p>
831 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>.
832 <p>
833 Referenced by <a class="el" href="users_8cpp-source.html#l00013">userrec()</a>.    </td>
834   </tr>
835 </table>
836 <hr>The documentation for this class was generated from the following files:<ul>
837 <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>
838 <hr><address style="align: right;"><small>Generated on Fri Apr 30 15:46:49 2004 for InspIRCd by
839 <a href="http://www.doxygen.org/index.html">
840 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
841 width=110 height=53></a>1.3-rc3 </small></address>
842 </body>
843 </html>