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.doxygen.css" rel="stylesheet" type="text/css">
6 <!-- Generated by Doxygen 1.3.3 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
8 <h1>chanrec Class Reference</h1>Holds all relevent information for a channel.
9 <a href="#_details">More...</a>
11 <code>#include <<a class="el" href="channels_8h-source.html">channels.h</a>></code>
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="">
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="">
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>
25 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
26 <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a0">SetCustomMode</a> (char mode, bool mode_on)</td></tr>
28 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a1">SetCustomModeParam</a> (char mode, char *parameter, bool mode_on)</td></tr>
31 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a2">IsCustomModeSet</a> (char mode)</td></tr>
34 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a3">GetModeParameter</a> (char mode)</td></tr>
37 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a4">GetUserCounter</a> ()</td></tr>
40 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a5">AddUser</a> (char *castuser)</td></tr>
43 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a6">DelUser</a> (char *castuser)</td></tr>
46 <tr><td class="mdescLeft"> </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< char * > * </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a7">GetUsers</a> ()</td></tr>
49 <tr><td class="mdescLeft"> </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> </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a8">chanrec</a> ()</td></tr>
52 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#a9">~chanrec</a> ()</td></tr>
55 <tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
56 <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o0">name</a> [CHANMAX]</td></tr>
58 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o1">custom_modes</a> [MAXMODES]</td></tr>
61 <tr><td class="mdescLeft"> </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< char * > </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o2">internal_userlist</a></td></tr>
64 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o3">topic</a> [MAXBUF]</td></tr>
67 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o4">created</a></td></tr>
70 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o5">topicset</a></td></tr>
73 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o6">setby</a> [NICKMAX]</td></tr>
76 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o7">limit</a></td></tr>
79 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o8">key</a> [32]</td></tr>
82 <tr><td class="mdescLeft"> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o9">binarymodes</a></td></tr>
85 <tr><td class="mdescLeft"> </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> </td><td class="memItemRight" valign=bottom><a class="el" href="classchanrec.html#o10">bans</a></td></tr>
88 <tr><td class="mdescLeft"> </td><td class="mdescRight">The list of all bans set on the channel. </em> <a href="#o10"></a><em><br><br></td></tr>
90 <hr><a name="_details"></a><h2>Detailed Description</h2>
91 Holds all relevent information for a channel.
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.
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 & Destructor Documentation</h2>
98 <a name="a8" doxytag="chanrec::chanrec"></a><p>
99 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
102 <table cellpadding="0" cellspacing="0" border="0">
104 <td class="md" nowrap valign="top"> chanrec::chanrec </td>
105 <td class="md" valign="top">( </td>
106 <td class="mdname1" valign="top" nowrap> </td>
107 <td class="md" valign="top"> ) </td>
108 <td class="md" nowrap></td>
115 <table cellspacing=5 cellpadding=0 border=0>
123 Creates a channel record and initialises it with default values.
127 Definition at line <a class="el" href="channels_8cpp-source.html#l00108">108</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
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>.
131 <div class="fragment"><pre>00109 {
132 00110 strcpy(name,<span class="stringliteral">""</span>);
133 00111 strcpy(custom_modes,<span class="stringliteral">""</span>);
134 00112 strcpy(topic,<span class="stringliteral">""</span>);
135 00113 strcpy(setby,<span class="stringliteral">""</span>);
136 00114 strcpy(key,<span class="stringliteral">""</span>);
137 00115 <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 00116 <a class="code" href="classchanrec.html#o9">binarymodes</a> = 0;
139 00117 <a class="code" href="classchanrec.html#o2">internal_userlist</a>.clear();
144 <a name="a9" doxytag="chanrec::~chanrec"></a><p>
145 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
148 <table cellpadding="0" cellspacing="0" border="0">
150 <td class="md" nowrap valign="top"> virtual chanrec::~<a class="el" href="classchanrec.html">chanrec</a> </td>
151 <td class="md" valign="top">( </td>
152 <td class="mdname1" valign="top" nowrap> </td>
153 <td class="md" valign="top"> ) </td>
154 <td class="md" nowrap><code> [inline, virtual]</code></td>
161 <table cellspacing=5 cellpadding=0 border=0>
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>.
173 <div class="fragment"><pre>00205 { <span class="comment">/* stub */</span> }
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">
182 <table cellpadding="0" cellspacing="0" border="0">
184 <td class="md" nowrap valign="top"> void chanrec::AddUser </td>
185 <td class="md" valign="top">( </td>
186 <td class="md" nowrap valign="top">char * </td>
187 <td class="mdname1" valign="top" nowrap> <em>castuser</em> </td>
188 <td class="md" valign="top"> ) </td>
189 <td class="md" nowrap></td>
196 <table cellspacing=5 cellpadding=0 border=0>
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.
208 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>.
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>.
212 <div class="fragment"><pre>00203 {
213 00204 <a class="code" href="classchanrec.html#o2">internal_userlist</a>.push_back(castuser);
214 00205 log(DEBUG,<span class="stringliteral">"Added casted user to channel's internal list"</span>);
219 <a name="a6" doxytag="chanrec::DelUser"></a><p>
220 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
223 <table cellpadding="0" cellspacing="0" border="0">
225 <td class="md" nowrap valign="top"> void chanrec::DelUser </td>
226 <td class="md" valign="top">( </td>
227 <td class="md" nowrap valign="top">char * </td>
228 <td class="mdname1" valign="top" nowrap> <em>castuser</em> </td>
229 <td class="md" valign="top"> ) </td>
230 <td class="md" nowrap></td>
237 <table cellspacing=5 cellpadding=0 border=0>
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.
249 Definition at line <a class="el" href="channels_8cpp-source.html#l00208">208</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
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>.
253 <div class="fragment"><pre>00209 {
254 00210 <span class="keywordflow">for</span> (std::vector<char*>::iterator a = <a class="code" href="classchanrec.html#o2">internal_userlist</a>.begin(); a < <a class="code" href="classchanrec.html#o2">internal_userlist</a>.end(); a++)
256 00212 <span class="keywordflow">if</span> (*a == castuser)
258 00214 log(DEBUG,<span class="stringliteral">"Removed casted user from channel's internal list"</span>);
259 00215 <a class="code" href="classchanrec.html#o2">internal_userlist</a>.erase(a);
260 00216 <span class="keywordflow">return</span>;
263 00219 log(DEBUG,<span class="stringliteral">"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!"</span>,name);
268 <a name="a3" doxytag="chanrec::GetModeParameter"></a><p>
269 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
272 <table cellpadding="0" cellspacing="0" border="0">
274 <td class="md" nowrap valign="top"> std::string chanrec::GetModeParameter </td>
275 <td class="md" valign="top">( </td>
276 <td class="md" nowrap valign="top">char </td>
277 <td class="mdname1" valign="top" nowrap> <em>mode</em> </td>
278 <td class="md" valign="top"> ) </td>
279 <td class="md" nowrap></td>
286 <table cellspacing=5 cellpadding=0 border=0>
294 Returns the parameter for a custom mode on a channel.
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.
298 Definition at line <a class="el" href="channels_8cpp-source.html#l00182">182</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
300 References <a class="el" href="channels_8cpp-source.html#l00106">custom_mode_params</a>.
302 <div class="fragment"><pre>00183 {
303 00184 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.size())
305 00186 <span class="keywordflow">for</span> (vector<ModeParameter>::iterator i = <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.begin(); i < <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.end(); i++)
307 00188 <span class="keywordflow">if</span> ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
309 00190 <span class="keywordflow">return</span> i->parameter;
313 00194 <span class="keywordflow">return</span> <span class="stringliteral">""</span>;
318 <a name="a4" doxytag="chanrec::GetUserCounter"></a><p>
319 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
322 <table cellpadding="0" cellspacing="0" border="0">
324 <td class="md" nowrap valign="top"> long chanrec::GetUserCounter </td>
325 <td class="md" valign="top">( </td>
326 <td class="mdname1" valign="top" nowrap> </td>
327 <td class="md" valign="top"> ) </td>
328 <td class="md" nowrap></td>
335 <table cellspacing=5 cellpadding=0 border=0>
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.
347 Definition at line <a class="el" href="channels_8cpp-source.html#l00197">197</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
349 References <a class="el" href="channels_8h-source.html#l00115">internal_userlist</a>.
351 <div class="fragment"><pre>00198 {
352 00199 <span class="keywordflow">return</span> (this-><a class="code" href="classchanrec.html#o2">internal_userlist</a>.size());
357 <a name="a7" doxytag="chanrec::GetUsers"></a><p>
358 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
361 <table cellpadding="0" cellspacing="0" border="0">
363 <td class="md" nowrap valign="top"> std::vector< char * > * chanrec::GetUsers </td>
364 <td class="md" valign="top">( </td>
365 <td class="mdname1" valign="top" nowrap> </td>
366 <td class="md" valign="top"> ) </td>
367 <td class="md" nowrap></td>
374 <table cellspacing=5 cellpadding=0 border=0>
382 Obrain the internal reference list The internal reference list contains a list of userrec* cast to char*.
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.
386 Definition at line <a class="el" href="channels_8cpp-source.html#l00222">222</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
388 References <a class="el" href="channels_8h-source.html#l00115">internal_userlist</a>.
390 Referenced by <a class="el" href="modules_8cpp-source.html#l00391">Server::GetUsers()</a>.
392 <div class="fragment"><pre>00223 {
393 00224 <span class="keywordflow">return</span> &<a class="code" href="classchanrec.html#o2">internal_userlist</a>;
398 <a name="a2" doxytag="chanrec::IsCustomModeSet"></a><p>
399 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
402 <table cellpadding="0" cellspacing="0" border="0">
404 <td class="md" nowrap valign="top"> bool chanrec::IsCustomModeSet </td>
405 <td class="md" valign="top">( </td>
406 <td class="md" nowrap valign="top">char </td>
407 <td class="mdname1" valign="top" nowrap> <em>mode</em> </td>
408 <td class="md" valign="top"> ) </td>
409 <td class="md" nowrap></td>
416 <table cellspacing=5 cellpadding=0 border=0>
424 Returns true if a custom mode is set on a channel.
428 Definition at line <a class="el" href="channels_8cpp-source.html#l00176">176</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
430 References <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>.
432 <div class="fragment"><pre>00177 {
433 00178 log(DEBUG,<span class="stringliteral">"Checking ISCustomModeSet: %c %s"</span>,mode,this->custom_modes);
434 00179 <span class="keywordflow">return</span> (strchr(this->custom_modes,mode) != 0);
439 <a name="a0" doxytag="chanrec::SetCustomMode"></a><p>
440 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
443 <table cellpadding="0" cellspacing="0" border="0">
445 <td class="md" nowrap valign="top"> void chanrec::SetCustomMode </td>
446 <td class="md" valign="top">( </td>
447 <td class="md" nowrap valign="top">char </td>
448 <td class="mdname" nowrap> <em>mode</em>, </td>
453 <td class="md" nowrap>bool </td>
454 <td class="mdname" nowrap> <em>mode_on</em></td>
458 <td class="md">) </td>
459 <td class="md" colspan="2"></td>
466 <table cellspacing=5 cellpadding=0 border=0>
474 Sets or unsets a custom mode in the channels info.
478 Definition at line <a class="el" href="channels_8cpp-source.html#l00120">120</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
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#l00145">SetCustomModeParam()</a>.
482 <div class="fragment"><pre>00121 {
483 00122 <span class="keywordflow">if</span> (mode_on) {
484 00123 <span class="keyword">static</span> <span class="keywordtype">char</span> m[3];
486 00125 m[1] = <span class="charliteral">'\0'</span>;
487 00126 <span class="keywordflow">if</span> (!strchr(this->custom_modes,mode))
489 00128 strlcat(custom_modes,m,MAXMODES);
491 00130 log(DEBUG,<span class="stringliteral">"Custom mode %c set"</span>,mode);
493 00132 <span class="keywordflow">else</span> {
495 00134 std::string a = this-><a class="code" href="classchanrec.html#o1">custom_modes</a>;
496 00135 <span class="keywordtype">int</span> pos = a.find(mode);
497 00136 a.erase(pos,1);
498 00137 strncpy(this->custom_modes,a.c_str(),MAXMODES);
500 00139 log(DEBUG,<span class="stringliteral">"Custom mode %c removed: modelist='%s'"</span>,mode,this->custom_modes);
501 00140 this-><a class="code" href="classchanrec.html#a1">SetCustomModeParam</a>(mode,<span class="stringliteral">""</span>,<span class="keyword">false</span>);
507 <a name="a1" doxytag="chanrec::SetCustomModeParam"></a><p>
508 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
511 <table cellpadding="0" cellspacing="0" border="0">
513 <td class="md" nowrap valign="top"> void chanrec::SetCustomModeParam </td>
514 <td class="md" valign="top">( </td>
515 <td class="md" nowrap valign="top">char </td>
516 <td class="mdname" nowrap> <em>mode</em>, </td>
521 <td class="md" nowrap>char * </td>
522 <td class="mdname" nowrap> <em>parameter</em>, </td>
527 <td class="md" nowrap>bool </td>
528 <td class="mdname" nowrap> <em>mode_on</em></td>
532 <td class="md">) </td>
533 <td class="md" colspan="2"></td>
540 <table cellspacing=5 cellpadding=0 border=0>
548 Sets or unsets the parameters for a custom mode in a channels info.
552 Definition at line <a class="el" href="channels_8cpp-source.html#l00145">145</a> of file <a class="el" href="channels_8cpp-source.html">channels.cpp</a>.
554 References <a class="el" href="channels_8h-source.html#l00082">ModeParameter::channel</a>, <a class="el" href="channels_8cpp-source.html#l00106">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>.
556 Referenced by <a class="el" href="channels_8cpp-source.html#l00120">SetCustomMode()</a>.
558 <div class="fragment"><pre>00146 {
560 00148 log(DEBUG,<span class="stringliteral">"SetCustomModeParam called"</span>);
561 00149 <a class="code" href="classModeParameter.html">ModeParameter</a> M;
562 00150 M.<a class="code" href="classModeParameter.html#o0">mode</a> = mode;
563 00151 strlcpy(M.<a class="code" href="classModeParameter.html#o2">channel</a>,this->name,CHANMAX);
564 00152 strlcpy(M.<a class="code" href="classModeParameter.html#o1">parameter</a>,parameter,MAXBUF);
565 00153 <span class="keywordflow">if</span> (mode_on)
567 00155 log(DEBUG,<span class="stringliteral">"Custom mode parameter %c %s added"</span>,mode,parameter);
568 00156 <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.push_back(M);
570 00158 <span class="keywordflow">else</span>
572 00160 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.size())
574 00162 <span class="keywordflow">for</span> (vector<ModeParameter>::iterator i = <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.begin(); i < <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.end(); i++)
576 00164 <span class="keywordflow">if</span> ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
578 00166 log(DEBUG,<span class="stringliteral">"Custom mode parameter %c %s removed"</span>,mode,parameter);
579 00167 <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.erase(i);
580 00168 <span class="keywordflow">return</span>;
584 00172 log(DEBUG,<span class="stringliteral">"*** BUG *** Attempt to remove non-existent mode parameter!"</span>);
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">
595 <table cellpadding="0" cellspacing="0" border="0">
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>
602 <table cellspacing=5 cellpadding=0 border=0>
610 The list of all bans set on the channel.
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>
617 <a name="o9" doxytag="chanrec::binarymodes"></a><p>
618 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
621 <table cellpadding="0" cellspacing="0" border="0">
623 <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o9">chanrec::binarymodes</a>
628 <table cellspacing=5 cellpadding=0 border=0>
636 Contains a bitmask of the CM_* builtin (RFC) binary mode symbols.
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>.
642 Referenced by <a class="el" href="channels_8cpp-source.html#l00108">chanrec()</a>. </td>
645 <a name="o4" doxytag="chanrec::created"></a><p>
646 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
649 <table cellpadding="0" cellspacing="0" border="0">
651 <td class="md" nowrap valign="top"> time_t <a class="el" href="classchanrec.html#o4">chanrec::created</a>
656 <table cellspacing=5 cellpadding=0 border=0>
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>.
670 Referenced by <a class="el" href="channels_8cpp-source.html#l00108">chanrec()</a>. </td>
673 <a name="o1" doxytag="chanrec::custom_modes"></a><p>
674 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
677 <table cellpadding="0" cellspacing="0" border="0">
679 <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o1">chanrec::custom_modes</a>[MAXMODES]
684 <table cellspacing=5 cellpadding=0 border=0>
692 Custom modes for the channel.
694 Plugins may use this field in any way they see fit.
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>.
698 Referenced by <a class="el" href="channels_8cpp-source.html#l00108">chanrec()</a>, and <a class="el" href="channels_8cpp-source.html#l00120">SetCustomMode()</a>. </td>
701 <a name="o2" doxytag="chanrec::internal_userlist"></a><p>
702 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
705 <table cellpadding="0" cellspacing="0" border="0">
707 <td class="md" nowrap valign="top"> std::vector<char*> <a class="el" href="classchanrec.html#o2">chanrec::internal_userlist</a>
712 <table cellspacing=5 cellpadding=0 border=0>
720 User list (casted to char*'s to stop forward declaration stuff) (chicken and egg scenario!).
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>.
726 Referenced by <a class="el" href="channels_8cpp-source.html#l00202">AddUser()</a>, <a class="el" href="channels_8cpp-source.html#l00108">chanrec()</a>, <a class="el" href="channels_8cpp-source.html#l00208">DelUser()</a>, <a class="el" href="channels_8cpp-source.html#l00197">GetUserCounter()</a>, and <a class="el" href="channels_8cpp-source.html#l00222">GetUsers()</a>. </td>
729 <a name="o8" doxytag="chanrec::key"></a><p>
730 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
733 <table cellpadding="0" cellspacing="0" border="0">
735 <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o8">chanrec::key</a>[32]
740 <table cellspacing=5 cellpadding=0 border=0>
748 Contains the channel key.
750 If this value is an empty string, there is no channel key in place.
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>.
754 Referenced by <a class="el" href="channels_8cpp-source.html#l00108">chanrec()</a>. </td>
757 <a name="o7" doxytag="chanrec::limit"></a><p>
758 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
761 <table cellpadding="0" cellspacing="0" border="0">
763 <td class="md" nowrap valign="top"> short int <a class="el" href="classchanrec.html#o7">chanrec::limit</a>
768 <table cellspacing=5 cellpadding=0 border=0>
776 Contains the channel user limit.
778 If this value is zero, there is no limit in place.
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>.
782 Referenced by <a class="el" href="channels_8cpp-source.html#l00108">chanrec()</a>. </td>
785 <a name="o0" doxytag="chanrec::name"></a><p>
786 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
789 <table cellpadding="0" cellspacing="0" border="0">
791 <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o0">chanrec::name</a>[CHANMAX]
796 <table cellspacing=5 cellpadding=0 border=0>
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>.
810 Referenced by <a class="el" href="channels_8cpp-source.html#l00108">chanrec()</a>, <a class="el" href="channels_8cpp-source.html#l00208">DelUser()</a>, and <a class="el" href="modules_8cpp-source.html#l00629">Server::PseudoToUser()</a>. </td>
813 <a name="o6" doxytag="chanrec::setby"></a><p>
814 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
817 <table cellpadding="0" cellspacing="0" border="0">
819 <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o6">chanrec::setby</a>[NICKMAX]
824 <table cellspacing=5 cellpadding=0 border=0>
832 The last user to set the topic.
834 If this member is an empty string, no topic was ever set.
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>.
838 Referenced by <a class="el" href="channels_8cpp-source.html#l00108">chanrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00629">Server::PseudoToUser()</a>. </td>
841 <a name="o3" doxytag="chanrec::topic"></a><p>
842 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
845 <table cellpadding="0" cellspacing="0" border="0">
847 <td class="md" nowrap valign="top"> char <a class="el" href="classchanrec.html#o3">chanrec::topic</a>[MAXBUF]
852 <table cellspacing=5 cellpadding=0 border=0>
862 If this is an empty string, no channel topic is set.
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>.
866 Referenced by <a class="el" href="channels_8cpp-source.html#l00108">chanrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00629">Server::PseudoToUser()</a>. </td>
869 <a name="o5" doxytag="chanrec::topicset"></a><p>
870 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
873 <table cellpadding="0" cellspacing="0" border="0">
875 <td class="md" nowrap valign="top"> time_t <a class="el" href="classchanrec.html#o5">chanrec::topicset</a>
880 <table cellspacing=5 cellpadding=0 border=0>
890 If no topic was ever set, this will be equal to <a class="el" href="classchanrec.html#o4">chanrec::created</a>
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>.
894 Referenced by <a class="el" href="channels_8cpp-source.html#l00108">chanrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00629">Server::PseudoToUser()</a>. </td>
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 Sun May 15 18:37:45 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>