diff options
Diffstat (limited to 'docs/module-doc/channels_8cpp-source.html')
-rw-r--r-- | docs/module-doc/channels_8cpp-source.html | 144 |
1 files changed, 98 insertions, 46 deletions
diff --git a/docs/module-doc/channels_8cpp-source.html b/docs/module-doc/channels_8cpp-source.html index 0ad69366d..bd341295b 100644 --- a/docs/module-doc/channels_8cpp-source.html +++ b/docs/module-doc/channels_8cpp-source.html @@ -5,56 +5,108 @@ </head><body> <!-- Generated by Doxygen 1.3-rc3 --> <center> -<a class="qindex" href="main.html">Main Page</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="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> +<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="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>channels.cpp</h1><a href="channels_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="preprocessor">#include "inspircd_config.h"</span> 00002 <span class="preprocessor">#include "<a class="code" href="channels_8h.html">channels.h</a>"</span> 00003 <span class="preprocessor">#include "inspircd.h"</span> 00004 <span class="preprocessor">#include <stdio.h></span> -00005 -<a name="l00006"></a><a class="code" href="classchanrec.html#a2">00006</a> <a class="code" href="classchanrec.html#a2">chanrec::chanrec</a>() -00007 { -00008 strcpy(name,<span class="stringliteral">""</span>); -00009 strcpy(custom_modes,<span class="stringliteral">""</span>); -00010 strcpy(topic,<span class="stringliteral">""</span>); -00011 strcpy(setby,<span class="stringliteral">""</span>); -00012 strcpy(key,<span class="stringliteral">""</span>); -00013 <a class="code" href="classchanrec.html#m3">created</a> = <a class="code" href="classchanrec.html#m4">topicset</a> = <a class="code" href="classchanrec.html#m6">limit</a> = 0; -00014 <a class="code" href="classchanrec.html#m8">topiclock</a> = <a class="code" href="classchanrec.html#m9">noexternal</a> = <a class="code" href="classchanrec.html#m10">inviteonly</a> = <a class="code" href="classchanrec.html#m11">moderated</a> = <a class="code" href="classchanrec.html#m12">secret</a> = <a class="code" href="classchanrec.html#m13">c_private</a> = <span class="keyword">false</span>; -00015 } -00016 -<a name="l00017"></a><a class="code" href="classchanrec.html#a0">00017</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) -00018 { -00019 <span class="keywordflow">if</span> (mode_on) { -00020 <span class="keywordtype">char</span> m[3]; -00021 m[0] = mode; -00022 m[1] = <span class="charliteral">'\0'</span>; -00023 <span class="keywordflow">if</span> (!strchr(this->custom_modes,mode)) -00024 { -00025 strncat(custom_modes,m,MAXMODES); -00026 } -00027 log(DEBUG,<span class="stringliteral">"Custom mode %c set"</span>,mode); -00028 } -00029 <span class="keywordflow">else</span> { -00030 <span class="keywordtype">char</span> temp[MAXMODES]; -00031 <span class="keywordtype">int</span> count = 0; -00032 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> q = 0; q < strlen(custom_modes); q++) { -00033 <span class="keywordflow">if</span> (<a class="code" href="classchanrec.html#m1">custom_modes</a>[q] != mode) { -00034 temp[count++] = mode; -00035 } -00036 } -00037 temp[count] = <span class="charliteral">'\0'</span>; -00038 strncpy(custom_modes,temp,MAXMODES); -00039 log(DEBUG,<span class="stringliteral">"Custom mode %c removed"</span>,mode); -00040 } -00041 } -00042 -<a name="l00043"></a><a class="code" href="classchanrec.html#a1">00043</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) -00044 { -00045 } -00046 -00047 -00048 -</pre></div><hr><address style="align: right;"><small>Generated on Sat Apr 3 16:36:02 2004 for InspIRCd by +00005 <span class="preprocessor">#include <string></span> +00006 <span class="preprocessor">#include <vector></span> +00007 +00008 <span class="keyword">using</span> <span class="keyword">namespace </span>std; +00009 +<a name="l00010"></a><a class="code" href="channels_8cpp.html#a0">00010</a> vector<ModeParameter> <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>; +00011 +<a name="l00012"></a><a class="code" href="classchanrec.html#a4">00012</a> <a class="code" href="classchanrec.html#a4">chanrec::chanrec</a>() +00013 { +00014 strcpy(name,<span class="stringliteral">""</span>); +00015 strcpy(custom_modes,<span class="stringliteral">""</span>); +00016 strcpy(topic,<span class="stringliteral">""</span>); +00017 strcpy(setby,<span class="stringliteral">""</span>); +00018 strcpy(key,<span class="stringliteral">""</span>); +00019 <a class="code" href="classchanrec.html#m3">created</a> = <a class="code" href="classchanrec.html#m4">topicset</a> = <a class="code" href="classchanrec.html#m6">limit</a> = 0; +00020 <a class="code" href="classchanrec.html#m8">topiclock</a> = <a class="code" href="classchanrec.html#m9">noexternal</a> = <a class="code" href="classchanrec.html#m10">inviteonly</a> = <a class="code" href="classchanrec.html#m11">moderated</a> = <a class="code" href="classchanrec.html#m12">secret</a> = <a class="code" href="classchanrec.html#m13">c_private</a> = <span class="keyword">false</span>; +00021 } +00022 +<a name="l00023"></a><a class="code" href="classchanrec.html#a0">00023</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) +00024 { +00025 <span class="keywordflow">if</span> (mode_on) { +00026 <span class="keywordtype">char</span> m[3]; +00027 m[0] = mode; +00028 m[1] = <span class="charliteral">'\0'</span>; +00029 <span class="keywordflow">if</span> (!strchr(this->custom_modes,mode)) +00030 { +00031 strncat(custom_modes,m,MAXMODES); +00032 } +00033 log(DEBUG,<span class="stringliteral">"Custom mode %c set"</span>,mode); +00034 } +00035 <span class="keywordflow">else</span> { +00036 <span class="keywordtype">char</span> temp[MAXBUF]; +00037 <span class="keywordtype">int</span> count = 0; +00038 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> q = 0; q < strlen(custom_modes); q++) { +00039 <span class="keywordflow">if</span> (<a class="code" href="classchanrec.html#m1">custom_modes</a>[q] != mode) { +00040 temp[count++] = mode; +00041 } +00042 } +00043 temp[count] = <span class="charliteral">'\0'</span>; +00044 strncpy(custom_modes,temp,MAXMODES); +00045 log(DEBUG,<span class="stringliteral">"Custom mode %c removed"</span>,mode); +00046 this-><a class="code" href="classchanrec.html#a1">SetCustomModeParam</a>(mode,<span class="stringliteral">""</span>,<span class="keyword">false</span>); +00047 } +00048 } +00049 +<a name="l00050"></a><a class="code" href="classchanrec.html#a1">00050</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) +00051 { +00052 +00053 log(DEBUG,<span class="stringliteral">"SetCustomModeParam called"</span>); +00054 <a class="code" href="classModeParameter.html">ModeParameter</a> M; +00055 M.<a class="code" href="classModeParameter.html#m0">mode</a> = mode; +00056 strcpy(M.<a class="code" href="classModeParameter.html#m2">channel</a>,this->name); +00057 strcpy(M.<a class="code" href="classModeParameter.html#m1">parameter</a>,parameter); +00058 <span class="keywordflow">if</span> (mode_on) +00059 { +00060 log(DEBUG,<span class="stringliteral">"Custom mode parameter %c %s added"</span>,mode,parameter); +00061 <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.push_back(M); +00062 } +00063 <span class="keywordflow">else</span> +00064 { +00065 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.size()) +00066 { +00067 <span class="keywordflow">for</span> (vector<ModeParameter>::iterator i = <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.begin(); i < <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.end(); i++) +00068 { +00069 <span class="keywordflow">if</span> ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +00070 { +00071 log(DEBUG,<span class="stringliteral">"Custom mode parameter %c %s removed"</span>,mode,parameter); +00072 <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.erase(i); +00073 <span class="keywordflow">return</span>; +00074 } +00075 } +00076 } +00077 log(DEBUG,<span class="stringliteral">"*** BUG *** Attempt to remove non-existent mode parameter!"</span>); +00078 } +00079 } +00080 +<a name="l00081"></a><a class="code" href="classchanrec.html#a2">00081</a> <span class="keywordtype">bool</span> <a class="code" href="classchanrec.html#a2">chanrec::IsCustomModeSet</a>(<span class="keywordtype">char</span> mode) +00082 { +00083 log(DEBUG,<span class="stringliteral">"Checking ISCustomModeSet: %c %s"</span>,mode,this->custom_modes); +00084 <span class="keywordflow">return</span> (strchr(this->custom_modes,mode) != 0); +00085 } +00086 +<a name="l00087"></a><a class="code" href="classchanrec.html#a3">00087</a> std::string <a class="code" href="classchanrec.html#a3">chanrec::GetModeParameter</a>(<span class="keywordtype">char</span> mode) +00088 { +00089 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.size()) +00090 { +00091 <span class="keywordflow">for</span> (vector<ModeParameter>::iterator i = <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.begin(); i < <a class="code" href="channels_8cpp.html#a0">custom_mode_params</a>.end(); i++) +00092 { +00093 <span class="keywordflow">if</span> ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +00094 { +00095 <span class="keywordflow">return</span> std::string(i->parameter); +00096 } +00097 } +00098 } +00099 <span class="keywordflow">return</span> std::string(<span class="stringliteral">""</span>); +00100 } +</pre></div><hr><address style="align: right;"><small>Generated on Sun Apr 4 23:02:14 2004 for InspIRCd by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.3-rc3 </small></address> |