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