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