diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-01 17:07:42 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-01 17:07:42 +0000 |
commit | f326e475e311bf0fa211ccd052ba38d8235efa12 (patch) | |
tree | 6171ffe18343d82d035901f0cfb0778876e71987 /docs/module-doc/channels_8cpp-source.html | |
parent | 260d107be38928396b5339829ab321c2207f09bc (diff) |
Updated documentation (html)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@937 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/module-doc/channels_8cpp-source.html')
-rw-r--r-- | docs/module-doc/channels_8cpp-source.html | 289 |
1 files changed, 145 insertions, 144 deletions
diff --git a/docs/module-doc/channels_8cpp-source.html b/docs/module-doc/channels_8cpp-source.html index 2e474e22d..70440fd36 100644 --- a/docs/module-doc/channels_8cpp-source.html +++ b/docs/module-doc/channels_8cpp-source.html @@ -57,152 +57,153 @@ 00050 <span class="preprocessor">#include "<a class="code" href="message_8h.html">message.h</a>"</span> 00051 <span class="preprocessor">#include "<a class="code" href="mode_8h.html">mode.h</a>"</span> 00052 <span class="preprocessor">#include "<a class="code" href="xline_8h.html">xline.h</a>"</span> -00053 -00054 <span class="preprocessor">#ifdef GCC3</span> -00055 <span class="preprocessor"></span><span class="preprocessor">#define nspace __gnu_cxx</span> -00056 <span class="preprocessor"></span><span class="preprocessor">#else</span> -<a name="l00057"></a><a class="code" href="channels_8cpp.html#a0">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define nspace std</span> -00058 <span class="preprocessor"></span><span class="preprocessor">#endif</span> -00059 <span class="preprocessor"></span> -00060 <span class="keyword">using</span> <span class="keyword">namespace </span>std; -00061 -00062 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a1">MODCOUNT</a>; -<a name="l00063"></a><a class="code" href="channels_8cpp.html#a2">00063</a> <span class="keyword">extern</span> vector<Module*> <a class="code" href="channels_8cpp.html#a2">modules</a>; -<a name="l00064"></a><a class="code" href="channels_8cpp.html#a3">00064</a> <span class="keyword">extern</span> vector<ircd_module*> <a class="code" href="channels_8cpp.html#a3">factory</a>; -00065 -<a name="l00066"></a><a class="code" href="channels_8cpp.html#a4">00066</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a4">LogLevel</a>; -<a name="l00067"></a><a class="code" href="channels_8cpp.html#a5">00067</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a5">ServerName</a>[MAXBUF]; -<a name="l00068"></a><a class="code" href="channels_8cpp.html#a6">00068</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a6">Network</a>[MAXBUF]; -<a name="l00069"></a><a class="code" href="channels_8cpp.html#a7">00069</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a7">ServerDesc</a>[MAXBUF]; -<a name="l00070"></a><a class="code" href="channels_8cpp.html#a8">00070</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a8">AdminName</a>[MAXBUF]; -<a name="l00071"></a><a class="code" href="channels_8cpp.html#a9">00071</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a9">AdminEmail</a>[MAXBUF]; -<a name="l00072"></a><a class="code" href="channels_8cpp.html#a10">00072</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a10">AdminNick</a>[MAXBUF]; -<a name="l00073"></a><a class="code" href="channels_8cpp.html#a11">00073</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a11">diepass</a>[MAXBUF]; -<a name="l00074"></a><a class="code" href="channels_8cpp.html#a12">00074</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a12">restartpass</a>[MAXBUF]; -<a name="l00075"></a><a class="code" href="channels_8cpp.html#a13">00075</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a13">motd</a>[MAXBUF]; -<a name="l00076"></a><a class="code" href="channels_8cpp.html#a14">00076</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a14">rules</a>[MAXBUF]; -<a name="l00077"></a><a class="code" href="channels_8cpp.html#a15">00077</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a15">list</a>[MAXBUF]; -<a name="l00078"></a><a class="code" href="channels_8cpp.html#a16">00078</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a16">PrefixQuit</a>[MAXBUF]; -<a name="l00079"></a><a class="code" href="channels_8cpp.html#a17">00079</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a17">DieValue</a>[MAXBUF]; -00080 -<a name="l00081"></a><a class="code" href="channels_8cpp.html#a18">00081</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a18">debugging</a>; -<a name="l00082"></a><a class="code" href="channels_8cpp.html#a19">00082</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a19">WHOWAS_STALE</a>; -<a name="l00083"></a><a class="code" href="channels_8cpp.html#a20">00083</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a20">WHOWAS_MAX</a>; -<a name="l00084"></a><a class="code" href="channels_8cpp.html#a21">00084</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a21">DieDelay</a>; -<a name="l00085"></a><a class="code" href="channels_8cpp.html#a22">00085</a> <span class="keyword">extern</span> time_t <a class="code" href="channels_8cpp.html#a22">startup_time</a>; -<a name="l00086"></a><a class="code" href="channels_8cpp.html#a23">00086</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a23">NetBufferSize</a>; -<a name="l00087"></a><a class="code" href="channels_8cpp.html#a24">00087</a> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a24">MaxWhoResults</a>; -<a name="l00088"></a><a class="code" href="channels_8cpp.html#a25">00088</a> <span class="keyword">extern</span> time_t <a class="code" href="channels_8cpp.html#a25">nb_start</a>; -00089 -<a name="l00090"></a><a class="code" href="channels_8cpp.html#a26">00090</a> <span class="keyword">extern</span> std::vector<int> <a class="code" href="channels_8cpp.html#a26">fd_reap</a>; -<a name="l00091"></a><a class="code" href="channels_8cpp.html#a27">00091</a> <span class="keyword">extern</span> std::vector<std::string> <a class="code" href="channels_8cpp.html#a27">module_names</a>; -00092 -<a name="l00093"></a><a class="code" href="channels_8cpp.html#a28">00093</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a28">boundPortCount</a>; -<a name="l00094"></a><a class="code" href="channels_8cpp.html#a29">00094</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a29">portCount</a>; -<a name="l00095"></a><a class="code" href="channels_8cpp.html#a30">00095</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a30">UDPportCount</a>; -<a name="l00096"></a><a class="code" href="channels_8cpp.html#a31">00096</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a31">ports</a>[MAXSOCKS]; -<a name="l00097"></a><a class="code" href="channels_8cpp.html#a32">00097</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a32">defaultRoute</a>; -00098 -<a name="l00099"></a><a class="code" href="channels_8cpp.html#a33">00099</a> <span class="keyword">extern</span> std::vector<long> <a class="code" href="channels_8cpp.html#a33">auth_cookies</a>; -<a name="l00100"></a><a class="code" href="channels_8cpp.html#a34">00100</a> <span class="keyword">extern</span> std::stringstream <a class="code" href="channels_8cpp.html#a34">config_f</a>; -00101 -<a name="l00102"></a><a class="code" href="channels_8cpp.html#a35">00102</a> <span class="keyword">extern</span> <a class="code" href="classserverrec.html">serverrec</a>* <a class="code" href="channels_8cpp.html#a35">me</a>[32]; -00103 -<a name="l00104"></a><a class="code" href="channels_8cpp.html#a36">00104</a> <span class="keyword">extern</span> FILE *<a class="code" href="channels_8cpp.html#a36">log_file</a>; -00105 +00053 <span class="preprocessor">#include "inspstring.h"</span> +00054 +00055 <span class="preprocessor">#ifdef GCC3</span> +00056 <span class="preprocessor"></span><span class="preprocessor">#define nspace __gnu_cxx</span> +00057 <span class="preprocessor"></span><span class="preprocessor">#else</span> +<a name="l00058"></a><a class="code" href="channels_8cpp.html#a0">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define nspace std</span> +00059 <span class="preprocessor"></span><span class="preprocessor">#endif</span> +00060 <span class="preprocessor"></span> +00061 <span class="keyword">using</span> <span class="keyword">namespace </span>std; +00062 +00063 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a1">MODCOUNT</a>; +<a name="l00064"></a><a class="code" href="channels_8cpp.html#a2">00064</a> <span class="keyword">extern</span> std::vector<Module*> <a class="code" href="channels_8cpp.html#a2">modules</a>; +<a name="l00065"></a><a class="code" href="channels_8cpp.html#a3">00065</a> <span class="keyword">extern</span> std::vector<ircd_module*> <a class="code" href="channels_8cpp.html#a3">factory</a>; +00066 +<a name="l00067"></a><a class="code" href="channels_8cpp.html#a4">00067</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a4">LogLevel</a>; +<a name="l00068"></a><a class="code" href="channels_8cpp.html#a5">00068</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a5">ServerName</a>[MAXBUF]; +<a name="l00069"></a><a class="code" href="channels_8cpp.html#a6">00069</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a6">Network</a>[MAXBUF]; +<a name="l00070"></a><a class="code" href="channels_8cpp.html#a7">00070</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a7">ServerDesc</a>[MAXBUF]; +<a name="l00071"></a><a class="code" href="channels_8cpp.html#a8">00071</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a8">AdminName</a>[MAXBUF]; +<a name="l00072"></a><a class="code" href="channels_8cpp.html#a9">00072</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a9">AdminEmail</a>[MAXBUF]; +<a name="l00073"></a><a class="code" href="channels_8cpp.html#a10">00073</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a10">AdminNick</a>[MAXBUF]; +<a name="l00074"></a><a class="code" href="channels_8cpp.html#a11">00074</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a11">diepass</a>[MAXBUF]; +<a name="l00075"></a><a class="code" href="channels_8cpp.html#a12">00075</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a12">restartpass</a>[MAXBUF]; +<a name="l00076"></a><a class="code" href="channels_8cpp.html#a13">00076</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a13">motd</a>[MAXBUF]; +<a name="l00077"></a><a class="code" href="channels_8cpp.html#a14">00077</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a14">rules</a>[MAXBUF]; +<a name="l00078"></a><a class="code" href="channels_8cpp.html#a15">00078</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a15">list</a>[MAXBUF]; +<a name="l00079"></a><a class="code" href="channels_8cpp.html#a16">00079</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a16">PrefixQuit</a>[MAXBUF]; +<a name="l00080"></a><a class="code" href="channels_8cpp.html#a17">00080</a> <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="channels_8cpp.html#a17">DieValue</a>[MAXBUF]; +00081 +<a name="l00082"></a><a class="code" href="channels_8cpp.html#a18">00082</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a18">debugging</a>; +<a name="l00083"></a><a class="code" href="channels_8cpp.html#a19">00083</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a19">WHOWAS_STALE</a>; +<a name="l00084"></a><a class="code" href="channels_8cpp.html#a20">00084</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a20">WHOWAS_MAX</a>; +<a name="l00085"></a><a class="code" href="channels_8cpp.html#a21">00085</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a21">DieDelay</a>; +<a name="l00086"></a><a class="code" href="channels_8cpp.html#a22">00086</a> <span class="keyword">extern</span> time_t <a class="code" href="channels_8cpp.html#a22">startup_time</a>; +<a name="l00087"></a><a class="code" href="channels_8cpp.html#a23">00087</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a23">NetBufferSize</a>; +<a name="l00088"></a><a class="code" href="channels_8cpp.html#a24">00088</a> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a24">MaxWhoResults</a>; +<a name="l00089"></a><a class="code" href="channels_8cpp.html#a25">00089</a> <span class="keyword">extern</span> time_t <a class="code" href="channels_8cpp.html#a25">nb_start</a>; +00090 +<a name="l00091"></a><a class="code" href="channels_8cpp.html#a26">00091</a> <span class="keyword">extern</span> std::vector<int> <a class="code" href="channels_8cpp.html#a26">fd_reap</a>; +<a name="l00092"></a><a class="code" href="channels_8cpp.html#a27">00092</a> <span class="keyword">extern</span> std::vector<std::string> <a class="code" href="channels_8cpp.html#a27">module_names</a>; +00093 +<a name="l00094"></a><a class="code" href="channels_8cpp.html#a28">00094</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a28">boundPortCount</a>; +<a name="l00095"></a><a class="code" href="channels_8cpp.html#a29">00095</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a29">portCount</a>; +<a name="l00096"></a><a class="code" href="channels_8cpp.html#a30">00096</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a30">UDPportCount</a>; +<a name="l00097"></a><a class="code" href="channels_8cpp.html#a31">00097</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a31">ports</a>[MAXSOCKS]; +<a name="l00098"></a><a class="code" href="channels_8cpp.html#a32">00098</a> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="channels_8cpp.html#a32">defaultRoute</a>; +00099 +<a name="l00100"></a><a class="code" href="channels_8cpp.html#a33">00100</a> <span class="keyword">extern</span> std::vector<long> <a class="code" href="channels_8cpp.html#a33">auth_cookies</a>; +<a name="l00101"></a><a class="code" href="channels_8cpp.html#a34">00101</a> <span class="keyword">extern</span> std::stringstream <a class="code" href="channels_8cpp.html#a34">config_f</a>; +00102 +<a name="l00103"></a><a class="code" href="channels_8cpp.html#a35">00103</a> <span class="keyword">extern</span> <a class="code" href="classserverrec.html">serverrec</a>* <a class="code" href="channels_8cpp.html#a35">me</a>[32]; +00104 +<a name="l00105"></a><a class="code" href="channels_8cpp.html#a36">00105</a> <span class="keyword">extern</span> FILE *<a class="code" href="channels_8cpp.html#a36">log_file</a>; 00106 -00107 <span class="keyword">using</span> <span class="keyword">namespace </span>std; -00108 -<a name="l00109"></a><a class="code" href="channels_8cpp.html#a37">00109</a> std::vector<ModeParameter> <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>; -00110 -<a name="l00111"></a><a class="code" href="classchanrec.html#a4">00111</a> <a class="code" href="classchanrec.html#a4">chanrec::chanrec</a>() -00112 { -00113 strcpy(<a class="code" href="classchanrec.html#o0">name</a>,<span class="stringliteral">""</span>); -00114 strcpy(<a class="code" href="classchanrec.html#o1">custom_modes</a>,<span class="stringliteral">""</span>); -00115 strcpy(<a class="code" href="classchanrec.html#o2">topic</a>,<span class="stringliteral">""</span>); -00116 strcpy(<a class="code" href="classchanrec.html#o5">setby</a>,<span class="stringliteral">""</span>); -00117 strcpy(<a class="code" href="classchanrec.html#o7">key</a>,<span class="stringliteral">""</span>); -00118 <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; -00119 <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>; -00120 } -00121 -<a name="l00122"></a><a class="code" href="classchanrec.html#a0">00122</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) -00123 { -00124 <span class="keywordflow">if</span> (mode_on) { -00125 <span class="keywordtype">char</span> m[3]; -00126 m[0] = mode; -00127 m[1] = <span class="charliteral">'\0'</span>; -00128 <span class="keywordflow">if</span> (!strchr(this->custom_modes,mode)) -00129 { -00130 strlcat(<a class="code" href="classchanrec.html#o1">custom_modes</a>,m,MAXMODES); -00131 } -00132 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode %c set"</span>,mode); -00133 } -00134 <span class="keywordflow">else</span> { -00135 -00136 std::string a = this-><a class="code" href="classchanrec.html#o1">custom_modes</a>; -00137 <span class="keywordtype">int</span> pos = a.find(mode); -00138 a.erase(pos,1); -00139 strncpy(this->custom_modes,a.c_str(),MAXMODES); -00140 -00141 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode %c removed: modelist='%s'"</span>,mode,this->custom_modes); -00142 this-><a class="code" href="classchanrec.html#a1">SetCustomModeParam</a>(mode,<span class="stringliteral">""</span>,<span class="keyword">false</span>); -00143 } -00144 } -00145 +00107 +00108 <span class="keyword">using</span> <span class="keyword">namespace </span>std; +00109 +<a name="l00110"></a><a class="code" href="channels_8cpp.html#a37">00110</a> std::vector<ModeParameter> <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>; +00111 +<a name="l00112"></a><a class="code" href="classchanrec.html#a4">00112</a> <a class="code" href="classchanrec.html#a4">chanrec::chanrec</a>() +00113 { +00114 strcpy(<a class="code" href="classchanrec.html#o0">name</a>,<span class="stringliteral">""</span>); +00115 strcpy(<a class="code" href="classchanrec.html#o1">custom_modes</a>,<span class="stringliteral">""</span>); +00116 strcpy(<a class="code" href="classchanrec.html#o2">topic</a>,<span class="stringliteral">""</span>); +00117 strcpy(<a class="code" href="classchanrec.html#o5">setby</a>,<span class="stringliteral">""</span>); +00118 strcpy(<a class="code" href="classchanrec.html#o7">key</a>,<span class="stringliteral">""</span>); +00119 <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; +00120 <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>; +00121 } +00122 +<a name="l00123"></a><a class="code" href="classchanrec.html#a0">00123</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) +00124 { +00125 <span class="keywordflow">if</span> (mode_on) { +00126 <span class="keywordtype">char</span> m[3]; +00127 m[0] = mode; +00128 m[1] = <span class="charliteral">'\0'</span>; +00129 <span class="keywordflow">if</span> (!strchr(this->custom_modes,mode)) +00130 { +00131 strlcat(<a class="code" href="classchanrec.html#o1">custom_modes</a>,m,MAXMODES); +00132 } +00133 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode %c set"</span>,mode); +00134 } +00135 <span class="keywordflow">else</span> { +00136 +00137 std::string a = this-><a class="code" href="classchanrec.html#o1">custom_modes</a>; +00138 <span class="keywordtype">int</span> pos = a.find(mode); +00139 a.erase(pos,1); +00140 strncpy(this->custom_modes,a.c_str(),MAXMODES); +00141 +00142 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode %c removed: modelist='%s'"</span>,mode,this->custom_modes); +00143 this-><a class="code" href="classchanrec.html#a1">SetCustomModeParam</a>(mode,<span class="stringliteral">""</span>,<span class="keyword">false</span>); +00144 } +00145 } 00146 -<a name="l00147"></a><a class="code" href="classchanrec.html#a1">00147</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) -00148 { -00149 -00150 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"SetCustomModeParam called"</span>); -00151 <a class="code" href="classModeParameter.html">ModeParameter</a> M; -00152 M.<a class="code" href="classModeParameter.html#o0">mode</a> = mode; -00153 strlcpy(M.<a class="code" href="classModeParameter.html#o2">channel</a>,this->name,CHANMAX); -00154 strlcpy(M.<a class="code" href="classModeParameter.html#o1">parameter</a>,parameter,MAXBUF); -00155 <span class="keywordflow">if</span> (mode_on) -00156 { -00157 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode parameter %c %s added"</span>,mode,parameter); -00158 <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.push_back(M); -00159 } -00160 <span class="keywordflow">else</span> -00161 { -00162 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.size()) -00163 { -00164 <span class="keywordflow">for</span> (vector<ModeParameter>::iterator i = <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.begin(); i < <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.end(); i++) -00165 { -00166 <span class="keywordflow">if</span> ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) -00167 { -00168 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode parameter %c %s removed"</span>,mode,parameter); -00169 <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.erase(i); -00170 <span class="keywordflow">return</span>; -00171 } -00172 } -00173 } -00174 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"*** BUG *** Attempt to remove non-existent mode parameter!"</span>); -00175 } -00176 } -00177 -<a name="l00178"></a><a class="code" href="classchanrec.html#a2">00178</a> <span class="keywordtype">bool</span> <a class="code" href="classchanrec.html#a2">chanrec::IsCustomModeSet</a>(<span class="keywordtype">char</span> mode) -00179 { -00180 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Checking ISCustomModeSet: %c %s"</span>,mode,this->custom_modes); -00181 <span class="keywordflow">return</span> (strchr(this->custom_modes,mode) != 0); -00182 } -00183 -<a name="l00184"></a><a class="code" href="classchanrec.html#a3">00184</a> std::string <a class="code" href="classchanrec.html#a3">chanrec::GetModeParameter</a>(<span class="keywordtype">char</span> mode) -00185 { -00186 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.size()) -00187 { -00188 <span class="keywordflow">for</span> (vector<ModeParameter>::iterator i = <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.begin(); i < <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.end(); i++) -00189 { -00190 <span class="keywordflow">if</span> ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) -00191 { -00192 <span class="keywordflow">return</span> std::string(i->parameter); -00193 } -00194 } -00195 } -00196 <span class="keywordflow">return</span> std::string(<span class="stringliteral">""</span>); -00197 } -</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Mar 25 03:49:27 2005 for InspIRCd by +00147 +<a name="l00148"></a><a class="code" href="classchanrec.html#a1">00148</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) +00149 { +00150 +00151 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"SetCustomModeParam called"</span>); +00152 <a class="code" href="classModeParameter.html">ModeParameter</a> M; +00153 M.<a class="code" href="classModeParameter.html#o0">mode</a> = mode; +00154 strlcpy(M.<a class="code" href="classModeParameter.html#o2">channel</a>,this->name,CHANMAX); +00155 strlcpy(M.<a class="code" href="classModeParameter.html#o1">parameter</a>,parameter,MAXBUF); +00156 <span class="keywordflow">if</span> (mode_on) +00157 { +00158 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode parameter %c %s added"</span>,mode,parameter); +00159 <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.push_back(M); +00160 } +00161 <span class="keywordflow">else</span> +00162 { +00163 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.size()) +00164 { +00165 <span class="keywordflow">for</span> (vector<ModeParameter>::iterator i = <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.begin(); i < <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.end(); i++) +00166 { +00167 <span class="keywordflow">if</span> ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +00168 { +00169 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Custom mode parameter %c %s removed"</span>,mode,parameter); +00170 <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.erase(i); +00171 <span class="keywordflow">return</span>; +00172 } +00173 } +00174 } +00175 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"*** BUG *** Attempt to remove non-existent mode parameter!"</span>); +00176 } +00177 } +00178 +<a name="l00179"></a><a class="code" href="classchanrec.html#a2">00179</a> <span class="keywordtype">bool</span> <a class="code" href="classchanrec.html#a2">chanrec::IsCustomModeSet</a>(<span class="keywordtype">char</span> mode) +00180 { +00181 log(<a class="code" href="modules_8h.html#a0">DEBUG</a>,<span class="stringliteral">"Checking ISCustomModeSet: %c %s"</span>,mode,this->custom_modes); +00182 <span class="keywordflow">return</span> (strchr(this->custom_modes,mode) != 0); +00183 } +00184 +<a name="l00185"></a><a class="code" href="classchanrec.html#a3">00185</a> std::string <a class="code" href="classchanrec.html#a3">chanrec::GetModeParameter</a>(<span class="keywordtype">char</span> mode) +00186 { +00187 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.size()) +00188 { +00189 <span class="keywordflow">for</span> (vector<ModeParameter>::iterator i = <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.begin(); i < <a class="code" href="channels_8cpp.html#a37">custom_mode_params</a>.end(); i++) +00190 { +00191 <span class="keywordflow">if</span> ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +00192 { +00193 <span class="keywordflow">return</span> std::string(i->parameter); +00194 } +00195 } +00196 } +00197 <span class="keywordflow">return</span> std::string(<span class="stringliteral">""</span>); +00198 } +</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Mar 28 21:09:24 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> |