]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classchanrec.html
f963cd3651fce8094fb7a7aa61287216568c5446
[user/henk/code/inspircd.git] / docs / module-doc / classchanrec.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: chanrec 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>chanrec Class Reference</h1>Holds all relevent information for a channel.  
9 <a href="#_details">More...</a>
10 <p>
11 <code>#include &lt;<a class="el" href="channels_8h-source.html">channels.h</a>&gt;</code>
12 <p>
13 Inheritance diagram for chanrec:<p><center><img src="classchanrec__inherit__graph.gif" border="0" usemap="#chanrec__inherit__map" alt="Inheritance graph"></center>
14 <map name="chanrec__inherit__map">
15 <area href="classExtensible.html" shape="rect" coords="8,82,90,109" alt="">
16 <area href="classclassbase.html" shape="rect" coords="9,8,89,34" alt="">
17 </map>
18 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for chanrec:<p><center><img src="classchanrec__coll__graph.gif" border="0" usemap="#chanrec__coll__map" alt="Collaboration graph"></center>
19 <map name="chanrec__coll__map">
20 <area href="classExtensible.html" shape="rect" coords="69,205,152,232" alt="">
21 <area href="classclassbase.html" shape="rect" coords="69,98,149,125" alt="">
22 </map>
23 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classchanrec-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
24 <tr><td></td></tr>
25 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
26 <tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a0">SetCustomMode</a> (char mode, bool mode_on)</td></tr>
27
28 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets or unsets a custom mode in the channels info. </em> <a href="#a0"></a><em><br><br></td></tr>
29 <tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a1">SetCustomModeParam</a> (char mode, char *parameter, bool mode_on)</td></tr>
30
31 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets or unsets the parameters for a custom mode in a channels info. </em> <a href="#a1"></a><em><br><br></td></tr>
32 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a2">IsCustomModeSet</a> (char mode)</td></tr>
33
34 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if a custom mode is set on a channel. </em> <a href="#a2"></a><em><br><br></td></tr>
35 <tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a3">GetModeParameter</a> (char mode)</td></tr>
36
37 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the parameter for a custom mode on a channel. </em> <a href="#a3"></a><em><br><br></td></tr>
38 <tr><td class="memItemLeft" nowrap align=right valign=top>long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a4">GetUserCounter</a> ()</td></tr>
39
40 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Obtain the channel "user counter" This returns the channel reference counter, which is initialized to 0 when the channel is created and incremented/decremented upon joins, parts quits and kicks. </em> <a href="#a4"></a><em><br><br></td></tr>
41 <tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a5">AddUser</a> (char *castuser)</td></tr>
42
43 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a user pointer to the internal reference list The data inserted into the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. </em> <a href="#a5"></a><em><br><br></td></tr>
44 <tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a6">DelUser</a> (char *castuser)</td></tr>
45
46 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete a user pointer to the internal reference list The data removed from the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. </em> <a href="#a6"></a><em><br><br></td></tr>
47 <tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; char * &gt; *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a7">GetUsers</a> ()</td></tr>
48
49 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Obrain the internal reference list The internal reference list contains a list of userrec* cast to char*. </em> <a href="#a7"></a><em><br><br></td></tr>
50 <tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a8">chanrec</a> ()</td></tr>
51
52 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a channel record and initialises it with default values. </em> <a href="#a8"></a><em><br><br></td></tr>
53 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a9">~chanrec</a> ()</td></tr>
54
55 <tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
56 <tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o0">name</a> [CHANMAX]</td></tr>
57
58 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The channels name. </em> <a href="#o0"></a><em><br><br></td></tr>
59 <tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o1">custom_modes</a> [MAXMODES]</td></tr>
60
61 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Custom modes for the channel. </em> <a href="#o1"></a><em><br><br></td></tr>
62 <tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; char * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o2">internal_userlist</a></td></tr>
63
64 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">User list (casted to char*'s to stop forward declaration stuff) (chicken and egg scenario!). </em> <a href="#o2"></a><em><br><br></td></tr>
65 <tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o3">topic</a> [MAXBUF]</td></tr>
66
67 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Channel topic. </em> <a href="#o3"></a><em><br><br></td></tr>
68 <tr><td class="memItemLeft" nowrap align=right valign=top>time_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o4">created</a></td></tr>
69
70 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creation time. </em> <a href="#o4"></a><em><br><br></td></tr>
71 <tr><td class="memItemLeft" nowrap align=right valign=top>time_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o5">topicset</a></td></tr>
72
73 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Time topic was set. </em> <a href="#o5"></a><em><br><br></td></tr>
74 <tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o6">setby</a> [NICKMAX]</td></tr>
75
76 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The last user to set the topic. </em> <a href="#o6"></a><em><br><br></td></tr>
77 <tr><td class="memItemLeft" nowrap align=right valign=top>short int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o7">limit</a></td></tr>
78
79 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Contains the channel user limit. </em> <a href="#o7"></a><em><br><br></td></tr>
80 <tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o8">key</a> [32]</td></tr>
81
82 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Contains the channel key. </em> <a href="#o8"></a><em><br><br></td></tr>
83 <tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o9">binarymodes</a></td></tr>
84
85 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Contains a bitmask of the CM_* builtin (RFC) binary mode symbols. </em> <a href="#o9"></a><em><br><br></td></tr>
86 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="channels_8h.html#a11">BanList</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o10">bans</a></td></tr>
87
88 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The list of all bans set on the channel. </em> <a href="#o10"></a><em><br><br></td></tr>
89 </table>
90 <hr><a name="_details"></a><h2>Detailed Description</h2>
91 Holds all relevent information for a channel. 
92 <p>
93 This class represents a channel, and contains its name, modes, time created, topic, topic set time, etc, and an instance of the BanList type. 
94 <p>
95
96 <p>
97 Definition at line <a class="el" href="channels_8h-source.html#l00101">101</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
98 <a name="a8" doxytag="chanrec::chanrec"></a><p>
99 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
100   <tr>
101     <td class="mdRow">
102       <table cellpadding="0" cellspacing="0" border="0">
103         <tr>
104           <td class="md" nowrap valign="top"> chanrec::chanrec </td>
105           <td class="md" valign="top">(&nbsp;</td>
106           <td class="mdname1" valign="top" nowrap>          </td>
107           <td class="md" valign="top">&nbsp;)&nbsp;</td>
108           <td class="md" nowrap></td>
109         </tr>
110
111       </table>
112     </td>
113   </tr>
114 </table>
115 <table cellspacing=5 cellpadding=0 border=0>
116   <tr>
117     <td>
118       &nbsp;
119     </td>
120     <td>
121
122 <p>
123 Creates a channel record and initialises it with default values. 
124 <p>
125
126 <p>
127 Definition at line <a class="el" href="channels_8cpp-source.html#l00113">113</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
128 <p>
129 References <a class="el" href="channels_8h-source.html#l00145">binarymodes</a>, <a class="el" href="channels_8h-source.html#l00123">created</a>, <a class="el" href="channels_8h-source.html#l00110">custom_modes</a>, <a class="el" href="channels_8h-source.html#l00115">internal_userlist</a>, <a class="el" href="channels_8h-source.html#l00141">key</a>, <a class="el" href="channels_8h-source.html#l00136">limit</a>, <a class="el" href="channels_8h-source.html#l00106">name</a>, <a class="el" href="channels_8h-source.html#l00131">setby</a>, <a class="el" href="channels_8h-source.html#l00120">topic</a>, and <a class="el" href="channels_8h-source.html#l00127">topicset</a>.
130 <p>
131 <div class="fragment"><pre>00114 {
132 00115         strcpy(name,<span class="stringliteral">""</span>);
133 00116         strcpy(custom_modes,<span class="stringliteral">""</span>);
134 00117         strcpy(topic,<span class="stringliteral">""</span>);
135 00118         strcpy(setby,<span class="stringliteral">""</span>);
136 00119         strcpy(key,<span class="stringliteral">""</span>);
137 00120         <a class="code" href="classchanrec.html#o4">created</a> = <a class="code" href="classchanrec.html#o5">topicset</a> = <a class="code" href="classchanrec.html#o7">limit</a> = 0;
138 00121         <a class="code" href="classchanrec.html#o9">binarymodes</a> = 0;
139 00122         <a class="code" href="classchanrec.html#o2">internal_userlist</a>.clear();
140 00123 }
141 </pre></div>    </td>
142   </tr>
143 </table>
144 <a name="a9" doxytag="chanrec::~chanrec"></a><p>
145 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
146   <tr>
147     <td class="mdRow">
148       <table cellpadding="0" cellspacing="0" border="0">
149         <tr>
150           <td class="md" nowrap valign="top"> virtual chanrec::~<a class="el" href="classchanrec.html">chanrec</a> </td>
151           <td class="md" valign="top">(&nbsp;</td>
152           <td class="mdname1" valign="top" nowrap>          </td>
153           <td class="md" valign="top">&nbsp;)&nbsp;</td>
154           <td class="md" nowrap><code> [inline, virtual]</code></td>
155         </tr>
156
157       </table>
158     </td>
159   </tr>
160 </table>
161 <table cellspacing=5 cellpadding=0 border=0>
162   <tr>
163     <td>
164       &nbsp;
165     </td>
166     <td>
167
168 <p>
169
170 <p>
171 Definition at line <a class="el" href="channels_8h-source.html#l00205">205</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
172 <p>
173 <div class="fragment"><pre>00205 { <span class="comment">/* stub */</span> }
174 </pre></div>    </td>
175   </tr>
176 </table>
177 <hr><h2>Member Function Documentation</h2>
178 <a name="a5" doxytag="chanrec::AddUser"></a><p>
179 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
180   <tr>
181     <td class="mdRow">
182       <table cellpadding="0" cellspacing="0" border="0">
183         <tr>
184           <td class="md" nowrap valign="top"> void chanrec::AddUser </td>
185           <td class="md" valign="top">(&nbsp;</td>
186           <td class="md" nowrap valign="top">char *&nbsp;</td>
187           <td class="mdname1" valign="top" nowrap> <em>castuser</em>          </td>
188           <td class="md" valign="top">&nbsp;)&nbsp;</td>
189           <td class="md" nowrap></td>
190         </tr>
191
192       </table>
193     </td>
194   </tr>
195 </table>
196 <table cellspacing=5 cellpadding=0 border=0>
197   <tr>
198     <td>
199       &nbsp;
200     </td>
201     <td>
202
203 <p>
204 Add a user pointer to the internal reference list The data inserted into the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. 
205 <p>
206
207 <p>
208 Definition at line <a class="el" href="channels_8cpp-source.html#l00207">207</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
209 <p>
210 References <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, and <a class="el" href="channels_8h-source.html#l00115">internal_userlist</a>.
211 <p>
212 <div class="fragment"><pre>00208 {
213 00209         <a class="code" href="classchanrec.html#o2">internal_userlist</a>.push_back(castuser);
214 00210         log(DEBUG,<span class="stringliteral">"Added casted user to channel's internal list"</span>);
215 00211 }
216 </pre></div>    </td>
217   </tr>
218 </table>
219 <a name="a6" doxytag="chanrec::DelUser"></a><p>
220 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
221   <tr>
222     <td class="mdRow">
223       <table cellpadding="0" cellspacing="0" border="0">
224         <tr>
225           <td class="md" nowrap valign="top"> void chanrec::DelUser </td>
226           <td class="md" valign="top">(&nbsp;</td>
227           <td class="md" nowrap valign="top">char *&nbsp;</td>
228           <td class="mdname1" valign="top" nowrap> <em>castuser</em>          </td>
229           <td class="md" valign="top">&nbsp;)&nbsp;</td>
230           <td class="md" nowrap></td>
231         </tr>
232
233       </table>
234     </td>
235   </tr>
236 </table>
237 <table cellspacing=5 cellpadding=0 border=0>
238   <tr>
239     <td>
240       &nbsp;
241     </td>
242     <td>
243
244 <p>
245 Delete a user pointer to the internal reference list The data removed from the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. 
246 <p>
247
248 <p>
249 Definition at line <a class="el" href="channels_8cpp-source.html#l00213">213</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
250 <p>
251 References <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, <a class="el" href="channels_8h-source.html#l00115">internal_userlist</a>, and <a class="el" href="channels_8h-source.html#l00106">name</a>.
252 <p>
253 <div class="fragment"><pre>00214 {
254 00215         <span class="keywordflow">for</span> (std::vector&lt;char*&gt;::iterator a = <a class="code" href="classchanrec.html#o2">internal_userlist</a>.begin(); a &lt; <a class="code" href="classchanrec.html#o2">internal_userlist</a>.end(); a++)
255 00216         {
256 00217                 <span class="keywordflow">if</span> (*a == castuser)
257 00218                 {
258 00219                         log(DEBUG,<span class="stringliteral">"Removed casted user from channel's internal list"</span>);
259 00220                         <a class="code" href="classchanrec.html#o2">internal_userlist</a>.erase(a);
260 00221                         <span class="keywordflow">return</span>;
261 00222                 }
262 00223         }
263 00224         log(DEBUG,<span class="stringliteral">"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!"</span>,name);
264 00225 }
265 </pre></div>    </td>
266   </tr>
267 </table>
268 <a name="a3" doxytag="chanrec::GetModeParameter"></a><p>
269 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
270   <tr>
271     <td class="mdRow">
272       <table cellpadding="0" cellspacing="0" border="0">
273         <tr>
274           <td class="md" nowrap valign="top"> std::string chanrec::GetModeParameter </td>
275           <td class="md" valign="top">(&nbsp;</td>
276           <td class="md" nowrap valign="top">char&nbsp;</td>
277           <td class="mdname1" valign="top" nowrap> <em>mode</em>          </td>
278           <td class="md" valign="top">&nbsp;)&nbsp;</td>
279           <td class="md" nowrap></td>
280         </tr>
281
282       </table>
283     </td>
284   </tr>
285 </table>
286 <table cellspacing=5 cellpadding=0 border=0>
287   <tr>
288     <td>
289       &nbsp;
290     </td>
291     <td>
292
293 <p>
294 Returns the parameter for a custom mode on a channel. 
295 <p>
296 For example if "+L #foo" is set, and you pass this method 'L', it will return '#foo'. If the mode is not set on the channel, or the mode has no parameters associated with it, it will return an empty string.
297 <p>
298 Definition at line <a class="el" href="channels_8cpp-source.html#l00187">187</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
299 <p>
300 References <a class="el" href="channels_8cpp-source.html#l00111">custom_mode_params</a>.
301 <p>
302 <div class="fragment"><pre>00188 {
303 00189         <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.size())
304 00190         {
305 00191                 <span class="keywordflow">for</span> (vector&lt;ModeParameter&gt;::iterator i = <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.begin(); i &lt; <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.end(); i++)
306 00192                 {
307 00193                         <span class="keywordflow">if</span> ((i-&gt;mode == mode) &amp;&amp; (!strcasecmp(this-&gt;name,i-&gt;channel)))
308 00194                         {
309 00195                                 <span class="keywordflow">return</span> i-&gt;parameter;
310 00196                         }
311 00197                 }
312 00198         }
313 00199         <span class="keywordflow">return</span> <span class="stringliteral">""</span>;
314 00200 }
315 </pre></div>    </td>
316   </tr>
317 </table>
318 <a name="a4" doxytag="chanrec::GetUserCounter"></a><p>
319 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
320   <tr>
321     <td class="mdRow">
322       <table cellpadding="0" cellspacing="0" border="0">
323         <tr>
324           <td class="md" nowrap valign="top"> long chanrec::GetUserCounter </td>
325           <td class="md" valign="top">(&nbsp;</td>
326           <td class="mdname1" valign="top" nowrap>          </td>
327           <td class="md" valign="top">&nbsp;)&nbsp;</td>
328           <td class="md" nowrap></td>
329         </tr>
330
331       </table>
332     </td>
333   </tr>
334 </table>
335 <table cellspacing=5 cellpadding=0 border=0>
336   <tr>
337     <td>
338       &nbsp;
339     </td>
340     <td>
341
342 <p>
343 Obtain the channel "user counter" This returns the channel reference counter, which is initialized to 0 when the channel is created and incremented/decremented upon joins, parts quits and kicks. 
344 <p>
345
346 <p>
347 Definition at line <a class="el" href="channels_8cpp-source.html#l00202">202</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
348 <p>
349 References <a class="el" href="channels_8h-source.html#l00115">internal_userlist</a>.
350 <p>
351 <div class="fragment"><pre>00203 {
352 00204         <span class="keywordflow">return</span> (this-&gt;<a class="code" href="classchanrec.html#o2">internal_userlist</a>.size());
353 00205 }
354 </pre></div>    </td>
355   </tr>
356 </table>
357 <a name="a7" doxytag="chanrec::GetUsers"></a><p>
358 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
359   <tr>
360     <td class="mdRow">
361       <table cellpadding="0" cellspacing="0" border="0">
362         <tr>
363           <td class="md" nowrap valign="top"> std::vector&lt; char * &gt; * chanrec::GetUsers </td>
364           <td class="md" valign="top">(&nbsp;</td>
365           <td class="mdname1" valign="top" nowrap>          </td>
366           <td class="md" valign="top">&nbsp;)&nbsp;</td>
367           <td class="md" nowrap></td>
368         </tr>
369
370       </table>
371     </td>
372   </tr>
373 </table>
374 <table cellspacing=5 cellpadding=0 border=0>
375   <tr>
376     <td>
377       &nbsp;
378     </td>
379     <td>
380
381 <p>
382 Obrain the internal reference list The internal reference list contains a list of userrec* cast to char*. 
383 <p>
384 These are used for rapid comparison to determine channel membership for PRIVMSG, NOTICE, QUIT, PART etc. The resulting pointer to the vector should be considered readonly and only modified via AddUser and DelUser.
385 <p>
386 Definition at line <a class="el" href="channels_8cpp-source.html#l00227">227</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
387 <p>
388 References <a class="el" href="channels_8h-source.html#l00115">internal_userlist</a>.
389 <p>
390 Referenced by <a class="el" href="modules_8cpp-source.html#l00467">Server::GetUsers()</a>.
391 <p>
392 <div class="fragment"><pre>00228 {
393 00229         <span class="keywordflow">return</span> &amp;<a class="code" href="classchanrec.html#o2">internal_userlist</a>;
394 00230 }
395 </pre></div>    </td>
396   </tr>
397 </table>
398 <a name="a2" doxytag="chanrec::IsCustomModeSet"></a><p>
399 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
400   <tr>
401     <td class="mdRow">
402       <table cellpadding="0" cellspacing="0" border="0">
403         <tr>
404           <td class="md" nowrap valign="top"> bool chanrec::IsCustomModeSet </td>
405           <td class="md" valign="top">(&nbsp;</td>
406           <td class="md" nowrap valign="top">char&nbsp;</td>
407           <td class="mdname1" valign="top" nowrap> <em>mode</em>          </td>
408           <td class="md" valign="top">&nbsp;)&nbsp;</td>
409           <td class="md" nowrap></td>
410         </tr>
411
412       </table>
413     </td>
414   </tr>
415 </table>
416 <table cellspacing=5 cellpadding=0 border=0>
417   <tr>
418     <td>
419       &nbsp;
420     </td>
421     <td>
422
423 <p>
424 Returns true if a custom mode is set on a channel. 
425 <p>
426
427 <p>
428 Definition at line <a class="el" href="channels_8cpp-source.html#l00181">181</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
429 <p>
430 References <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>.
431 <p>
432 <div class="fragment"><pre>00182 {
433 00183         log(DEBUG,<span class="stringliteral">"Checking ISCustomModeSet: %c %s"</span>,mode,this-&gt;custom_modes);
434 00184         <span class="keywordflow">return</span> (strchr(this-&gt;custom_modes,mode) != 0);
435 00185 }
436 </pre></div>    </td>
437   </tr>
438 </table>
439 <a name="a0" doxytag="chanrec::SetCustomMode"></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 chanrec::SetCustomMode </td>
446           <td class="md" valign="top">(&nbsp;</td>
447           <td class="md" nowrap valign="top">char&nbsp;</td>
448           <td class="mdname" nowrap> <em>mode</em>, </td>
449         </tr>
450         <tr>
451           <td></td>
452           <td></td>
453           <td class="md" nowrap>bool&nbsp;</td>
454           <td class="mdname" nowrap> <em>mode_on</em></td>
455         </tr>
456         <tr>
457           <td></td>
458           <td class="md">)&nbsp;</td>
459           <td class="md" colspan="2"></td>
460         </tr>
461
462       </table>
463     </td>
464   </tr>
465 </table>
466 <table cellspacing=5 cellpadding=0 border=0>
467   <tr>
468     <td>
469       &nbsp;
470     </td>
471     <td>
472
473 <p>
474 Sets or unsets a custom mode in the channels info. 
475 <p>
476
477 <p>
478 Definition at line <a class="el" href="channels_8cpp-source.html#l00125">125</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
479 <p>
480 References <a class="el" href="channels_8h-source.html#l00110">custom_modes</a>, <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, and <a class="el" href="channels_8cpp-source.html#l00150">SetCustomModeParam()</a>.
481 <p>
482 <div class="fragment"><pre>00126 {
483 00127         <span class="keywordflow">if</span> (mode_on) {
484 00128                 <span class="keyword">static</span> <span class="keywordtype">char</span> m[3];
485 00129                 m[0] = mode;
486 00130                 m[1] = <span class="charliteral">'\0'</span>;
487 00131                 <span class="keywordflow">if</span> (!strchr(this-&gt;custom_modes,mode))
488 00132                 {
489 00133                         strlcat(custom_modes,m,MAXMODES);
490 00134                 }
491 00135                 log(DEBUG,<span class="stringliteral">"Custom mode %c set"</span>,mode);
492 00136         }
493 00137         <span class="keywordflow">else</span> {
494 00138 
495 00139                 std::string a = this-&gt;<a class="code" href="classchanrec.html#o1">custom_modes</a>;
496 00140                 <span class="keywordtype">int</span> pos = a.find(mode);
497 00141                 a.erase(pos,1);
498 00142                 strncpy(this-&gt;custom_modes,a.c_str(),MAXMODES);
499 00143 
500 00144                 log(DEBUG,<span class="stringliteral">"Custom mode %c removed: modelist='%s'"</span>,mode,this-&gt;custom_modes);
501 00145                 this-&gt;<a class="code" href="classchanrec.html#a1">SetCustomModeParam</a>(mode,<span class="stringliteral">""</span>,<span class="keyword">false</span>);
502 00146         }
503 00147 }
504 </pre></div>    </td>
505   </tr>
506 </table>
507 <a name="a1" doxytag="chanrec::SetCustomModeParam"></a><p>
508 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
509   <tr>
510     <td class="mdRow">
511       <table cellpadding="0" cellspacing="0" border="0">
512         <tr>
513           <td class="md" nowrap valign="top"> void chanrec::SetCustomModeParam </td>
514           <td class="md" valign="top">(&nbsp;</td>
515           <td class="md" nowrap valign="top">char&nbsp;</td>
516           <td class="mdname" nowrap> <em>mode</em>, </td>
517         </tr>
518         <tr>
519           <td></td>
520           <td></td>
521           <td class="md" nowrap>char *&nbsp;</td>
522           <td class="mdname" nowrap> <em>parameter</em>, </td>
523         </tr>
524         <tr>
525           <td></td>
526           <td></td>
527           <td class="md" nowrap>bool&nbsp;</td>
528           <td class="mdname" nowrap> <em>mode_on</em></td>
529         </tr>
530         <tr>
531           <td></td>
532           <td class="md">)&nbsp;</td>
533           <td class="md" colspan="2"></td>
534         </tr>
535
536       </table>
537     </td>
538   </tr>
539 </table>
540 <table cellspacing=5 cellpadding=0 border=0>
541   <tr>
542     <td>
543       &nbsp;
544     </td>
545     <td>
546
547 <p>
548 Sets or unsets the parameters for a custom mode in a channels info. 
549 <p>
550
551 <p>
552 Definition at line <a class="el" href="channels_8cpp-source.html#l00150">150</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
553 <p>
554 References <a class="el" href="channels_8h-source.html#l00082">ModeParameter::channel</a>, <a class="el" href="channels_8cpp-source.html#l00111">custom_mode_params</a>, <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, <a class="el" href="channels_8h-source.html#l00080">ModeParameter::mode</a>, and <a class="el" href="channels_8h-source.html#l00081">ModeParameter::parameter</a>.
555 <p>
556 Referenced by <a class="el" href="channels_8cpp-source.html#l00125">SetCustomMode()</a>.
557 <p>
558 <div class="fragment"><pre>00151 {
559 00152 
560 00153         log(DEBUG,<span class="stringliteral">"SetCustomModeParam called"</span>);
561 00154         <a class="code" href="classModeParameter.html">ModeParameter</a> M;
562 00155         M.<a class="code" href="classModeParameter.html#o0">mode</a> = mode;
563 00156         strlcpy(M.<a class="code" href="classModeParameter.html#o2">channel</a>,this-&gt;name,CHANMAX);
564 00157         strlcpy(M.<a class="code" href="classModeParameter.html#o1">parameter</a>,parameter,MAXBUF);
565 00158         <span class="keywordflow">if</span> (mode_on)
566 00159         {
567 00160                 log(DEBUG,<span class="stringliteral">"Custom mode parameter %c %s added"</span>,mode,parameter);
568 00161                 <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.push_back(M);
569 00162         }
570 00163         <span class="keywordflow">else</span>
571 00164         {
572 00165                 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.size())
573 00166                 {
574 00167                         <span class="keywordflow">for</span> (vector&lt;ModeParameter&gt;::iterator i = <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.begin(); i &lt; <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.end(); i++)
575 00168                         {
576 00169                                 <span class="keywordflow">if</span> ((i-&gt;mode == mode) &amp;&amp; (!strcasecmp(this-&gt;name,i-&gt;channel)))
577 00170                                 {
578 00171                                         log(DEBUG,<span class="stringliteral">"Custom mode parameter %c %s removed"</span>,mode,parameter);
579 00172                                         <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.erase(i);
580 00173                                         <span class="keywordflow">return</span>;
581 00174                                 }
582 00175                         }
583 00176                 }
584 00177                 log(DEBUG,<span class="stringliteral">"*** BUG *** Attempt to remove non-existent mode parameter!"</span>);
585 00178         }
586 00179 }
587 </pre></div>    </td>
588   </tr>
589 </table>
590 <hr><h2>Member Data Documentation</h2>
591 <a name="o10" doxytag="chanrec::bans"></a><p>
592 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
593   <tr>
594     <td class="mdRow">
595       <table cellpadding="0" cellspacing="0" border="0">
596         <tr>
597           <td class="md" nowrap valign="top"> <a class="el" href="channels_8h.html#a11">BanList</a> <a class="el" href="classchanrec.html#o10">chanrec::bans</a>
598       </table>
599     </td>
600   </tr>
601 </table>
602 <table cellspacing=5 cellpadding=0 border=0>
603   <tr>
604     <td>
605       &nbsp;
606     </td>
607     <td>
608
609 <p>
610 The list of all bans set on the channel. 
611 <p>
612
613 <p>
614 Definition at line <a class="el" href="channels_8h-source.html#l00149">149</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.    </td>
615   </tr>
616 </table>
617 <a name="o9" doxytag="chanrec::binarymodes"></a><p>
618 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
619   <tr>
620     <td class="mdRow">
621       <table cellpadding="0" cellspacing="0" border="0">
622         <tr>
623           <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o9">chanrec::binarymodes</a>
624       </table>
625     </td>
626   </tr>
627 </table>
628 <table cellspacing=5 cellpadding=0 border=0>
629   <tr>
630     <td>
631       &nbsp;
632     </td>
633     <td>
634
635 <p>
636 Contains a bitmask of the CM_* builtin (RFC) binary mode symbols. 
637 <p>
638
639 <p>
640 Definition at line <a class="el" href="channels_8h-source.html#l00145">145</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
641 <p>
642 Referenced by <a class="el" href="channels_8cpp-source.html#l00113">chanrec()</a>.    </td>
643   </tr>
644 </table>
645 <a name="o4" doxytag="chanrec::created"></a><p>
646 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
647   <tr>
648     <td class="mdRow">
649       <table cellpadding="0" cellspacing="0" border="0">
650         <tr>
651           <td class="md" nowrap valign="top"> time_t <a class="el" href="classchanrec.html#o4">chanrec::created</a>
652       </table>
653     </td>
654   </tr>
655 </table>
656 <table cellspacing=5 cellpadding=0 border=0>
657   <tr>
658     <td>
659       &nbsp;
660     </td>
661     <td>
662
663 <p>
664 Creation time. 
665 <p>
666
667 <p>
668 Definition at line <a class="el" href="channels_8h-source.html#l00123">123</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
669 <p>
670 Referenced by <a class="el" href="channels_8cpp-source.html#l00113">chanrec()</a>.    </td>
671   </tr>
672 </table>
673 <a name="o1" doxytag="chanrec::custom_modes"></a><p>
674 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
675   <tr>
676     <td class="mdRow">
677       <table cellpadding="0" cellspacing="0" border="0">
678         <tr>
679           <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o1">chanrec::custom_modes</a>[MAXMODES]
680       </table>
681     </td>
682   </tr>
683 </table>
684 <table cellspacing=5 cellpadding=0 border=0>
685   <tr>
686     <td>
687       &nbsp;
688     </td>
689     <td>
690
691 <p>
692 Custom modes for the channel. 
693 <p>
694 Plugins may use this field in any way they see fit.
695 <p>
696 Definition at line <a class="el" href="channels_8h-source.html#l00110">110</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
697 <p>
698 Referenced by <a class="el" href="channels_8cpp-source.html#l00113">chanrec()</a>, and <a class="el" href="channels_8cpp-source.html#l00125">SetCustomMode()</a>.    </td>
699   </tr>
700 </table>
701 <a name="o2" doxytag="chanrec::internal_userlist"></a><p>
702 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
703   <tr>
704     <td class="mdRow">
705       <table cellpadding="0" cellspacing="0" border="0">
706         <tr>
707           <td class="md" nowrap valign="top"> std::vector&lt;char*&gt; <a class="el" href="classchanrec.html#o2">chanrec::internal_userlist</a>
708       </table>
709     </td>
710   </tr>
711 </table>
712 <table cellspacing=5 cellpadding=0 border=0>
713   <tr>
714     <td>
715       &nbsp;
716     </td>
717     <td>
718
719 <p>
720 User list (casted to char*'s to stop forward declaration stuff) (chicken and egg scenario!). 
721 <p>
722
723 <p>
724 Definition at line <a class="el" href="channels_8h-source.html#l00115">115</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
725 <p>
726 Referenced by <a class="el" href="channels_8cpp-source.html#l00207">AddUser()</a>, <a class="el" href="channels_8cpp-source.html#l00113">chanrec()</a>, <a class="el" href="channels_8cpp-source.html#l00213">DelUser()</a>, <a class="el" href="channels_8cpp-source.html#l00202">GetUserCounter()</a>, and <a class="el" href="channels_8cpp-source.html#l00227">GetUsers()</a>.    </td>
727   </tr>
728 </table>
729 <a name="o8" doxytag="chanrec::key"></a><p>
730 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
731   <tr>
732     <td class="mdRow">
733       <table cellpadding="0" cellspacing="0" border="0">
734         <tr>
735           <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o8">chanrec::key</a>[32]
736       </table>
737     </td>
738   </tr>
739 </table>
740 <table cellspacing=5 cellpadding=0 border=0>
741   <tr>
742     <td>
743       &nbsp;
744     </td>
745     <td>
746
747 <p>
748 Contains the channel key. 
749 <p>
750 If this value is an empty string, there is no channel key in place.
751 <p>
752 Definition at line <a class="el" href="channels_8h-source.html#l00141">141</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
753 <p>
754 Referenced by <a class="el" href="channels_8cpp-source.html#l00113">chanrec()</a>.    </td>
755   </tr>
756 </table>
757 <a name="o7" doxytag="chanrec::limit"></a><p>
758 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
759   <tr>
760     <td class="mdRow">
761       <table cellpadding="0" cellspacing="0" border="0">
762         <tr>
763           <td class="md" nowrap valign="top"> short int <a class="el" href="classchanrec.html#o7">chanrec::limit</a>
764       </table>
765     </td>
766   </tr>
767 </table>
768 <table cellspacing=5 cellpadding=0 border=0>
769   <tr>
770     <td>
771       &nbsp;
772     </td>
773     <td>
774
775 <p>
776 Contains the channel user limit. 
777 <p>
778 If this value is zero, there is no limit in place.
779 <p>
780 Definition at line <a class="el" href="channels_8h-source.html#l00136">136</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
781 <p>
782 Referenced by <a class="el" href="channels_8cpp-source.html#l00113">chanrec()</a>.    </td>
783   </tr>
784 </table>
785 <a name="o0" doxytag="chanrec::name"></a><p>
786 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
787   <tr>
788     <td class="mdRow">
789       <table cellpadding="0" cellspacing="0" border="0">
790         <tr>
791           <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o0">chanrec::name</a>[CHANMAX]
792       </table>
793     </td>
794   </tr>
795 </table>
796 <table cellspacing=5 cellpadding=0 border=0>
797   <tr>
798     <td>
799       &nbsp;
800     </td>
801     <td>
802
803 <p>
804 The channels name. 
805 <p>
806
807 <p>
808 Definition at line <a class="el" href="channels_8h-source.html#l00106">106</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
809 <p>
810 Referenced by <a class="el" href="channels_8cpp-source.html#l00113">chanrec()</a>, <a class="el" href="channels_8cpp-source.html#l00213">DelUser()</a>, and <a class="el" href="modules_8cpp-source.html#l00700">Server::PseudoToUser()</a>.    </td>
811   </tr>
812 </table>
813 <a name="o6" doxytag="chanrec::setby"></a><p>
814 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
815   <tr>
816     <td class="mdRow">
817       <table cellpadding="0" cellspacing="0" border="0">
818         <tr>
819           <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o6">chanrec::setby</a>[NICKMAX]
820       </table>
821     </td>
822   </tr>
823 </table>
824 <table cellspacing=5 cellpadding=0 border=0>
825   <tr>
826     <td>
827       &nbsp;
828     </td>
829     <td>
830
831 <p>
832 The last user to set the topic. 
833 <p>
834 If this member is an empty string, no topic was ever set.
835 <p>
836 Definition at line <a class="el" href="channels_8h-source.html#l00131">131</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
837 <p>
838 Referenced by <a class="el" href="channels_8cpp-source.html#l00113">chanrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00700">Server::PseudoToUser()</a>.    </td>
839   </tr>
840 </table>
841 <a name="o3" doxytag="chanrec::topic"></a><p>
842 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
843   <tr>
844     <td class="mdRow">
845       <table cellpadding="0" cellspacing="0" border="0">
846         <tr>
847           <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o3">chanrec::topic</a>[MAXBUF]
848       </table>
849     </td>
850   </tr>
851 </table>
852 <table cellspacing=5 cellpadding=0 border=0>
853   <tr>
854     <td>
855       &nbsp;
856     </td>
857     <td>
858
859 <p>
860 Channel topic. 
861 <p>
862 If this is an empty string, no channel topic is set.
863 <p>
864 Definition at line <a class="el" href="channels_8h-source.html#l00120">120</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
865 <p>
866 Referenced by <a class="el" href="channels_8cpp-source.html#l00113">chanrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00700">Server::PseudoToUser()</a>.    </td>
867   </tr>
868 </table>
869 <a name="o5" doxytag="chanrec::topicset"></a><p>
870 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
871   <tr>
872     <td class="mdRow">
873       <table cellpadding="0" cellspacing="0" border="0">
874         <tr>
875           <td class="md" nowrap valign="top"> time_t <a class="el" href="classchanrec.html#o5">chanrec::topicset</a>
876       </table>
877     </td>
878   </tr>
879 </table>
880 <table cellspacing=5 cellpadding=0 border=0>
881   <tr>
882     <td>
883       &nbsp;
884     </td>
885     <td>
886
887 <p>
888 Time topic was set. 
889 <p>
890 If no topic was ever set, this will be equal to <a class="el" href="classchanrec.html#o4">chanrec::created</a>
891 <p>
892 Definition at line <a class="el" href="channels_8h-source.html#l00127">127</a> of file <a class="el" href="channels_8h-source.html">channels.h</a>.
893 <p>
894 Referenced by <a class="el" href="channels_8cpp-source.html#l00113">chanrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00700">Server::PseudoToUser()</a>.    </td>
895   </tr>
896 </table>
897 <hr>The documentation for this class was generated from the following files:<ul>
898 <li><a class="el" href="channels_8h-source.html">channels.h</a><li><a class="el" href="channels_8cpp-source.html">channels.cpp</a></ul>
899 <hr size="1"><address style="align: right;"><small>Generated on Fri May 13 01:59:27 2005 for InspIRCd by
900 <a href="http://www.doxygen.org/index.html">
901 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
902 </a>1.3.3 </small></address>
903 </body>
904 </html>