summaryrefslogtreecommitdiff
path: root/docs/module-doc/channels_8cpp-source.html
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-26 17:15:49 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-26 17:15:49 +0000
commit5a2675d174e661c55843b3795afe2d688e7197f9 (patch)
tree729b446ce25c0bce81157f1a4158865055468f45 /docs/module-doc/channels_8cpp-source.html
parent3ffb95a12391eac5cf89549af9e790362fbfc075 (diff)
New documentation!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1199 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/module-doc/channels_8cpp-source.html')
-rw-r--r--docs/module-doc/channels_8cpp-source.html212
1 files changed, 128 insertions, 84 deletions
diff --git a/docs/module-doc/channels_8cpp-source.html b/docs/module-doc/channels_8cpp-source.html
index a78f32fa8..c149c9b12 100644
--- a/docs/module-doc/channels_8cpp-source.html
+++ b/docs/module-doc/channels_8cpp-source.html
@@ -117,94 +117,138 @@
00110
<a name="l00111"></a><a class="code" href="channels_8cpp.html#a38">00111</a> std::vector&lt;ModeParameter&gt; <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>;
00112
-<a name="l00113"></a><a class="code" href="classchanrec.html#a4">00113</a> <a class="code" href="classchanrec.html#a4">chanrec::chanrec</a>()
+<a name="l00113"></a><a class="code" href="classchanrec.html#a10">00113</a> <a class="code" href="classchanrec.html#a10">chanrec::chanrec</a>()
00114 {
00115 strcpy(<a class="code" href="classchanrec.html#o0">name</a>,<span class="stringliteral">""</span>);
00116 strcpy(<a class="code" href="classchanrec.html#o1">custom_modes</a>,<span class="stringliteral">""</span>);
-00117 strcpy(<a class="code" href="classchanrec.html#o2">topic</a>,<span class="stringliteral">""</span>);
-00118 strcpy(<a class="code" href="classchanrec.html#o5">setby</a>,<span class="stringliteral">""</span>);
-00119 strcpy(<a class="code" href="classchanrec.html#o7">key</a>,<span class="stringliteral">""</span>);
-00120 <a class="code" href="classchanrec.html#o3">created</a> = <a class="code" href="classchanrec.html#o4">topicset</a> = <a class="code" href="classchanrec.html#o6">limit</a> = 0;
-00121 <a class="code" href="classchanrec.html#o8">topiclock</a> = <a class="code" href="classchanrec.html#o9">noexternal</a> = <a class="code" href="classchanrec.html#o10">inviteonly</a> = <a class="code" href="classchanrec.html#o11">moderated</a> = <a class="code" href="classchanrec.html#o12">secret</a> = <a class="code" href="classchanrec.html#o13">c_private</a> = <span class="keyword">false</span>;
-00122 }
-00123
-<a name="l00124"></a><a class="code" href="classchanrec.html#a0">00124</a> <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a0">chanrec::SetCustomMode</a>(<span class="keywordtype">char</span> mode,<span class="keywordtype">bool</span> mode_on)
-00125 {
-00126 <span class="keywordflow">if</span> (mode_on) {
-00127 <span class="keywordtype">char</span> m[3];
-00128 m[0] = mode;
-00129 m[1] = <span class="charliteral">'\0'</span>;
-00130 <span class="keywordflow">if</span> (!strchr(this-&gt;custom_modes,mode))
-00131 {
-00132 strlcat(<a class="code" href="classchanrec.html#o1">custom_modes</a>,m,MAXMODES);
-00133 }
-00134 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode %c set"</span>,mode);
-00135 }
-00136 <span class="keywordflow">else</span> {
-00137
-00138 std::string a = this-&gt;<a class="code" href="classchanrec.html#o1">custom_modes</a>;
-00139 <span class="keywordtype">int</span> pos = a.find(mode);
-00140 a.erase(pos,1);
-00141 strncpy(this-&gt;custom_modes,a.c_str(),MAXMODES);
-00142
-00143 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode %c removed: modelist='%s'"</span>,mode,this-&gt;custom_modes);
-00144 this-&gt;<a class="code" href="classchanrec.html#a1">SetCustomModeParam</a>(mode,<span class="stringliteral">""</span>,<span class="keyword">false</span>);
-00145 }
-00146 }
-00147
+00117 strcpy(<a class="code" href="classchanrec.html#o4">topic</a>,<span class="stringliteral">""</span>);
+00118 strcpy(<a class="code" href="classchanrec.html#o7">setby</a>,<span class="stringliteral">""</span>);
+00119 strcpy(<a class="code" href="classchanrec.html#o9">key</a>,<span class="stringliteral">""</span>);
+00120 <a class="code" href="classchanrec.html#o5">created</a> = <a class="code" href="classchanrec.html#o6">topicset</a> = <a class="code" href="classchanrec.html#o8">limit</a> = <a class="code" href="classchanrec.html#o2">users</a> = 0;
+00121 <a class="code" href="classchanrec.html#o10">topiclock</a> = <a class="code" href="classchanrec.html#o11">noexternal</a> = <a class="code" href="classchanrec.html#o12">inviteonly</a> = <a class="code" href="classchanrec.html#o13">moderated</a> = <a class="code" href="classchanrec.html#o14">secret</a> = <a class="code" href="classchanrec.html#o15">c_private</a> = <span class="keyword">false</span>;
+00122 <a class="code" href="classchanrec.html#o3">internal_userlist</a>.clear();
+00123 }
+00124
+<a name="l00125"></a><a class="code" href="classchanrec.html#a0">00125</a> <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a0">chanrec::SetCustomMode</a>(<span class="keywordtype">char</span> mode,<span class="keywordtype">bool</span> mode_on)
+00126 {
+00127 <span class="keywordflow">if</span> (mode_on) {
+00128 <span class="keywordtype">char</span> m[3];
+00129 m[0] = mode;
+00130 m[1] = <span class="charliteral">'\0'</span>;
+00131 <span class="keywordflow">if</span> (!strchr(this-&gt;custom_modes,mode))
+00132 {
+00133 strlcat(<a class="code" href="classchanrec.html#o1">custom_modes</a>,m,MAXMODES);
+00134 }
+00135 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode %c set"</span>,mode);
+00136 }
+00137 <span class="keywordflow">else</span> {
+00138
+00139 std::string a = this-&gt;<a class="code" href="classchanrec.html#o1">custom_modes</a>;
+00140 <span class="keywordtype">int</span> pos = a.find(mode);
+00141 a.erase(pos,1);
+00142 strncpy(this-&gt;custom_modes,a.c_str(),MAXMODES);
+00143
+00144 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode %c removed: modelist='%s'"</span>,mode,this-&gt;custom_modes);
+00145 this-&gt;<a class="code" href="classchanrec.html#a1">SetCustomModeParam</a>(mode,<span class="stringliteral">""</span>,<span class="keyword">false</span>);
+00146 }
+00147 }
00148
-<a name="l00149"></a><a class="code" href="classchanrec.html#a1">00149</a> <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a1">chanrec::SetCustomModeParam</a>(<span class="keywordtype">char</span> mode,<span class="keywordtype">char</span>* parameter,<span class="keywordtype">bool</span> mode_on)
-00150 {
-00151
-00152 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"SetCustomModeParam called"</span>);
-00153 <a class="code" href="classModeParameter.html">ModeParameter</a> M;
-00154 M.<a class="code" href="classModeParameter.html#o0">mode</a> = mode;
-00155 strlcpy(M.<a class="code" href="classModeParameter.html#o2">channel</a>,this-&gt;name,CHANMAX);
-00156 strlcpy(M.<a class="code" href="classModeParameter.html#o1">parameter</a>,parameter,MAXBUF);
-00157 <span class="keywordflow">if</span> (mode_on)
-00158 {
-00159 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode parameter %c %s added"</span>,mode,parameter);
-00160 <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.push_back(M);
-00161 }
-00162 <span class="keywordflow">else</span>
-00163 {
-00164 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.size())
-00165 {
-00166 <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++)
-00167 {
-00168 <span class="keywordflow">if</span> ((i-&gt;mode == mode) &amp;&amp; (!strcasecmp(this-&gt;name,i-&gt;channel)))
-00169 {
-00170 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode parameter %c %s removed"</span>,mode,parameter);
-00171 <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.erase(i);
-00172 <span class="keywordflow">return</span>;
-00173 }
-00174 }
-00175 }
-00176 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"*** BUG *** Attempt to remove non-existent mode parameter!"</span>);
-00177 }
-00178 }
-00179
-<a name="l00180"></a><a class="code" href="classchanrec.html#a2">00180</a> <span class="keywordtype">bool</span> <a class="code" href="classchanrec.html#a2">chanrec::IsCustomModeSet</a>(<span class="keywordtype">char</span> mode)
-00181 {
-00182 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Checking ISCustomModeSet: %c %s"</span>,mode,this-&gt;custom_modes);
-00183 <span class="keywordflow">return</span> (strchr(this-&gt;custom_modes,mode) != 0);
-00184 }
-00185
-<a name="l00186"></a><a class="code" href="classchanrec.html#a3">00186</a> std::string <a class="code" href="classchanrec.html#a3">chanrec::GetModeParameter</a>(<span class="keywordtype">char</span> mode)
-00187 {
-00188 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.size())
-00189 {
-00190 <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++)
-00191 {
-00192 <span class="keywordflow">if</span> ((i-&gt;mode == mode) &amp;&amp; (!strcasecmp(this-&gt;name,i-&gt;channel)))
-00193 {
-00194 <span class="keywordflow">return</span> std::string(i-&gt;parameter);
-00195 }
-00196 }
-00197 }
-00198 <span class="keywordflow">return</span> std::string(<span class="stringliteral">""</span>);
-00199 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 20 15:46:53 2005 for InspIRCd by
+00149
+<a name="l00150"></a><a class="code" href="classchanrec.html#a1">00150</a> <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a1">chanrec::SetCustomModeParam</a>(<span class="keywordtype">char</span> mode,<span class="keywordtype">char</span>* parameter,<span class="keywordtype">bool</span> mode_on)
+00151 {
+00152
+00153 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"SetCustomModeParam called"</span>);
+00154 <a class="code" href="classModeParameter.html">ModeParameter</a> M;
+00155 M.<a class="code" href="classModeParameter.html#o0">mode</a> = mode;
+00156 strlcpy(M.<a class="code" href="classModeParameter.html#o2">channel</a>,this-&gt;name,CHANMAX);
+00157 strlcpy(M.<a class="code" href="classModeParameter.html#o1">parameter</a>,parameter,MAXBUF);
+00158 <span class="keywordflow">if</span> (mode_on)
+00159 {
+00160 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode parameter %c %s added"</span>,mode,parameter);
+00161 <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.push_back(M);
+00162 }
+00163 <span class="keywordflow">else</span>
+00164 {
+00165 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.size())
+00166 {
+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++)
+00168 {
+00169 <span class="keywordflow">if</span> ((i-&gt;mode == mode) &amp;&amp; (!strcasecmp(this-&gt;name,i-&gt;channel)))
+00170 {
+00171 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode parameter %c %s removed"</span>,mode,parameter);
+00172 <a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.erase(i);
+00173 <span class="keywordflow">return</span>;
+00174 }
+00175 }
+00176 }
+00177 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"*** BUG *** Attempt to remove non-existent mode parameter!"</span>);
+00178 }
+00179 }
+00180
+<a name="l00181"></a><a class="code" href="classchanrec.html#a2">00181</a> <span class="keywordtype">bool</span> <a class="code" href="classchanrec.html#a2">chanrec::IsCustomModeSet</a>(<span class="keywordtype">char</span> mode)
+00182 {
+00183 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Checking ISCustomModeSet: %c %s"</span>,mode,this-&gt;custom_modes);
+00184 <span class="keywordflow">return</span> (strchr(this-&gt;custom_modes,mode) != 0);
+00185 }
+00186
+<a name="l00187"></a><a class="code" href="classchanrec.html#a3">00187</a> std::string <a class="code" href="classchanrec.html#a3">chanrec::GetModeParameter</a>(<span class="keywordtype">char</span> mode)
+00188 {
+00189 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a38">custom_mode_params</a>.size())
+00190 {
+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++)
+00192 {
+00193 <span class="keywordflow">if</span> ((i-&gt;mode == mode) &amp;&amp; (!strcasecmp(this-&gt;name,i-&gt;channel)))
+00194 {
+00195 <span class="keywordflow">return</span> std::string(i-&gt;parameter);
+00196 }
+00197 }
+00198 }
+00199 <span class="keywordflow">return</span> std::string(<span class="stringliteral">""</span>);
+00200 }
+00201
+<a name="l00202"></a><a class="code" href="classchanrec.html#a4">00202</a> <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a4">chanrec::IncUserCounter</a>()
+00203 {
+00204 this-&gt;<a class="code" href="classchanrec.html#o2">users</a>++;
+00205 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Incremented channel user count for %s to %lu"</span>,<a class="code" href="classchanrec.html#o0">name</a>,(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)<a class="code" href="classchanrec.html#o2">users</a>);
+00206 }
+00207
+<a name="l00208"></a><a class="code" href="classchanrec.html#a5">00208</a> <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a5">chanrec::DecUserCounter</a>()
+00209 {
+00210 <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classchanrec.html#o2">users</a> &gt; 0)
+00211 this-&gt;<a class="code" href="classchanrec.html#o2">users</a>--;
+00212 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Decremented channel user count for %s to %lu"</span>,<a class="code" href="classchanrec.html#o0">name</a>,(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)<a class="code" href="classchanrec.html#o2">users</a>);
+00213 }
+00214
+<a name="l00215"></a><a class="code" href="classchanrec.html#a6">00215</a> <span class="keywordtype">long</span> <a class="code" href="classchanrec.html#a6">chanrec::GetUserCounter</a>()
+00216 {
+00217 <span class="keywordflow">return</span> (this-&gt;<a class="code" href="classchanrec.html#o2">users</a>);
+00218 }
+00219
+<a name="l00220"></a><a class="code" href="classchanrec.html#a7">00220</a> <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a7">chanrec::AddUser</a>(<span class="keywordtype">char</span>* castuser)
+00221 {
+00222 <a class="code" href="classchanrec.html#o3">internal_userlist</a>.push_back(castuser);
+00223 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Added casted user to channel's internal list"</span>);
+00224 }
+00225
+<a name="l00226"></a><a class="code" href="classchanrec.html#a8">00226</a> <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a8">chanrec::DelUser</a>(<span class="keywordtype">char</span>* castuser)
+00227 {
+00228 <span class="keywordflow">for</span> (std::vector&lt;char*&gt;::iterator a = <a class="code" href="classchanrec.html#o3">internal_userlist</a>.begin(); a &lt; <a class="code" href="classchanrec.html#o3">internal_userlist</a>.end(); a++)
+00229 {
+00230 <span class="keywordflow">if</span> (*a == castuser)
+00231 {
+00232 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Removed casted user from channel's internal list"</span>);
+00233 <a class="code" href="classchanrec.html#o3">internal_userlist</a>.erase(a);
+00234 <span class="keywordflow">return</span>;
+00235 }
+00236 }
+00237 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!"</span>,<a class="code" href="classchanrec.html#o0">name</a>);
+00238 }
+00239
+<a name="l00240"></a><a class="code" href="classchanrec.html#a9">00240</a> std::vector&lt;char*&gt; *<a class="code" href="classchanrec.html#a9">chanrec::GetUsers</a>()
+00241 {
+00242 <span class="keywordflow">return</span> &amp;<a class="code" href="classchanrec.html#o3">internal_userlist</a>;
+00243 }
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Apr 26 17:11:43 2005 for InspIRCd by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.3 </small></address>