diff options
Diffstat (limited to 'docs/module-doc/modules_8cpp-source.html')
-rw-r--r-- | docs/module-doc/modules_8cpp-source.html | 516 |
1 files changed, 259 insertions, 257 deletions
diff --git a/docs/module-doc/modules_8cpp-source.html b/docs/module-doc/modules_8cpp-source.html index 81e149e10..a6398c94a 100644 --- a/docs/module-doc/modules_8cpp-source.html +++ b/docs/module-doc/modules_8cpp-source.html @@ -127,266 +127,268 @@ <a name="l00119"></a><a class="code" href="classModule.html#a2">00119</a> <a class="code" href="classVersion.html">Version</a> <a class="code" href="classModule.html#a2">Module::GetVersion</a>() { <span class="keywordflow">return</span> <a class="code" href="classVersion.html">Version</a>(1,0,0,0); } <a name="l00120"></a><a class="code" href="classModule.html#a13">00120</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a13">Module::OnOper</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { }; <a name="l00121"></a><a class="code" href="classModule.html#a14">00121</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a14">Module::OnInfo</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { }; -00122 <span class="keywordtype">void</span> Module::OnWhois(<a class="code" href="classuserrec.html">userrec</a>* source, <a class="code" href="classuserrec.html">userrec</a>* dest) { }; -00123 -00124 <span class="comment">// server is a wrapper class that provides methods to all of the C-style</span> -00125 <span class="comment">// exports in the core</span> -00126 <span class="comment">//</span> -00127 -<a name="l00128"></a><a class="code" href="classServer.html#a0">00128</a> <a class="code" href="classServer.html#a0">Server::Server</a>() -00129 { -00130 } -00131 -<a name="l00132"></a><a class="code" href="classServer.html#a1">00132</a> <a class="code" href="classServer.html#a1">Server::~Server</a>() -00133 { -00134 } -00135 -<a name="l00136"></a><a class="code" href="classServer.html#a2">00136</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a2">Server::SendOpers</a>(std::string s) -00137 { -00138 WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str()); -00139 } -00140 -<a name="l00141"></a><a class="code" href="classServer.html#a22">00141</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a22">Server::SendToModeMask</a>(std::string modes, <span class="keywordtype">int</span> flags, std::string text) -00142 { -00143 WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str()); -00144 } -00145 -00146 <a class="code" href="classchanrec.html">chanrec</a>* Server::JoinUserToChannel(<a class="code" href="classuserrec.html">userrec</a>* user, std::string cname, std::string key) -00147 { -00148 <span class="keywordflow">return</span> add_channel(user,cname.c_str(),key.c_str()); -00149 } -00150 -00151 <a class="code" href="classchanrec.html">chanrec</a>* Server::PartUserFromChannel(<a class="code" href="classuserrec.html">userrec</a>* user, std::string cname, std::string reason) -00152 { -00153 <span class="keywordflow">return</span> del_channel(user,cname.c_str(),reason.c_str()); -00154 } -00155 -<a name="l00156"></a><a class="code" href="classServer.html#a25">00156</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a25">Server::ChangeUserNick</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string nickname) -00157 { -00158 force_nickchange(user,nickname.c_str()); -00159 } -00160 -<a name="l00161"></a><a class="code" href="classServer.html#a26">00161</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a26">Server::QuitUser</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string reason) -00162 { -00163 kill_link(user,reason.c_str()); -00164 } -00165 -00166 -<a name="l00167"></a><a class="code" href="classServer.html#a3">00167</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a3">Server::Log</a>(<span class="keywordtype">int</span> level, std::string s) -00168 { -00169 log(level,<span class="stringliteral">"%s"</span>,s.c_str()); -00170 } -00171 -<a name="l00172"></a><a class="code" href="classServer.html#a20">00172</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a20">Server::AddCommand</a>(<span class="keywordtype">char</span>* cmd, handlerfunc f, <span class="keywordtype">char</span> flags, <span class="keywordtype">int</span> minparams) -00173 { -00174 <a class="code" href="modules_8h.html#a13">createcommand</a>(cmd,f,flags,minparams); -00175 } -00176 -<a name="l00177"></a><a class="code" href="classServer.html#a21">00177</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a21">Server::SendMode</a>(<span class="keywordtype">char</span> **parameters, <span class="keywordtype">int</span> pcnt, <a class="code" href="classuserrec.html">userrec</a> *user) -00178 { -00179 <a class="code" href="modules_8h.html#a14">server_mode</a>(parameters,pcnt,user); -00180 } -00181 -<a name="l00182"></a><a class="code" href="classServer.html#a4">00182</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a4">Server::Send</a>(<span class="keywordtype">int</span> Socket, std::string s) -00183 { -00184 Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str()); -00185 } -00186 -<a name="l00187"></a><a class="code" href="classServer.html#a5">00187</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a5">Server::SendServ</a>(<span class="keywordtype">int</span> Socket, std::string s) -00188 { -00189 WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str()); -00190 } -00191 -<a name="l00192"></a><a class="code" href="classServer.html#a6">00192</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a6">Server::SendFrom</a>(<span class="keywordtype">int</span> Socket, <a class="code" href="classuserrec.html">userrec</a>* User, std::string s) -00193 { -00194 WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str()); -00195 } -00196 -<a name="l00197"></a><a class="code" href="classServer.html#a7">00197</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a7">Server::SendTo</a>(<a class="code" href="classuserrec.html">userrec</a>* Source, <a class="code" href="classuserrec.html">userrec</a>* Dest, std::string s) -00198 { -00199 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str()); -00200 } -00201 -<a name="l00202"></a><a class="code" href="classServer.html#a8">00202</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a8">Server::SendChannel</a>(<a class="code" href="classuserrec.html">userrec</a>* User, <a class="code" href="classchanrec.html">chanrec</a>* Channel, std::string s,<span class="keywordtype">bool</span> IncludeSender) -00203 { -00204 <span class="keywordflow">if</span> (IncludeSender) -00205 { -00206 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str()); -00207 } -00208 <span class="keywordflow">else</span> -00209 { -00210 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str()); -00211 } -00212 } -00213 -<a name="l00214"></a><a class="code" href="classServer.html#a9">00214</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a9">Server::CommonChannels</a>(<a class="code" href="classuserrec.html">userrec</a>* u1, <a class="code" href="classuserrec.html">userrec</a>* u2) -00215 { -00216 <span class="keywordflow">return</span> (common_channels(u1,u2) != 0); -00217 } -00218 -<a name="l00219"></a><a class="code" href="classServer.html#a10">00219</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a10">Server::SendCommon</a>(<a class="code" href="classuserrec.html">userrec</a>* User, std::string text,<span class="keywordtype">bool</span> IncludeSender) -00220 { -00221 <span class="keywordflow">if</span> (IncludeSender) -00222 { -00223 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str()); -00224 } -00225 <span class="keywordflow">else</span> -00226 { -00227 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str()); -00228 } -00229 } -00230 -<a name="l00231"></a><a class="code" href="classServer.html#a11">00231</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a11">Server::SendWallops</a>(<a class="code" href="classuserrec.html">userrec</a>* User, std::string text) -00232 { -00233 WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str()); -00234 } -00235 -<a name="l00236"></a><a class="code" href="classServer.html#a12">00236</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a12">Server::IsNick</a>(std::string nick) -00237 { -00238 <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0); -00239 } -00240 -<a name="l00241"></a><a class="code" href="classServer.html#a13">00241</a> <a class="code" href="classuserrec.html">userrec</a>* <a class="code" href="classServer.html#a13">Server::FindNick</a>(std::string nick) -00242 { -00243 <span class="keywordflow">return</span> Find(nick); -00244 } -00245 -<a name="l00246"></a><a class="code" href="classServer.html#a14">00246</a> <a class="code" href="classchanrec.html">chanrec</a>* <a class="code" href="classServer.html#a14">Server::FindChannel</a>(std::string channel) -00247 { -00248 <span class="keywordflow">return</span> FindChan(channel.c_str()); -00249 } -00250 -<a name="l00251"></a><a class="code" href="classServer.html#a15">00251</a> std::string <a class="code" href="classServer.html#a15">Server::ChanMode</a>(<a class="code" href="classuserrec.html">userrec</a>* User, <a class="code" href="classchanrec.html">chanrec</a>* Chan) -00252 { -00253 <span class="keywordflow">return</span> cmode(User,Chan); -00254 } -00255 -<a name="l00256"></a><a class="code" href="classServer.html#a16">00256</a> std::string <a class="code" href="classServer.html#a16">Server::GetServerName</a>() -00257 { -00258 <span class="keywordflow">return</span> getservername(); -00259 } -00260 -<a name="l00261"></a><a class="code" href="classServer.html#a17">00261</a> std::string <a class="code" href="classServer.html#a17">Server::GetNetworkName</a>() -00262 { -00263 <span class="keywordflow">return</span> getnetworkname(); -00264 } -00265 -<a name="l00266"></a><a class="code" href="classServer.html#a18">00266</a> <a class="code" href="classAdmin.html">Admin</a> <a class="code" href="classServer.html#a18">Server::GetAdmin</a>() -00267 { -00268 <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick()); -00269 } -00270 -00271 +<a name="l00122"></a><a class="code" href="classModule.html#a15">00122</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a15">Module::OnWhois</a>(<a class="code" href="classuserrec.html">userrec</a>* source, <a class="code" href="classuserrec.html">userrec</a>* dest) { }; +<a name="l00123"></a><a class="code" href="classModule.html#a16">00123</a> <span class="keywordtype">int</span> <a class="code" href="classModule.html#a16">Module::OnUserPreMessage</a>(<a class="code" href="classuserrec.html">userrec</a>* user,<span class="keywordtype">void</span>* dest,<span class="keywordtype">int</span> target_type, std::string text) { <span class="keywordflow">return</span> 0; }; +<a name="l00124"></a><a class="code" href="classModule.html#a17">00124</a> <span class="keywordtype">int</span> <a class="code" href="classModule.html#a17">Module::OnUserPreNotice</a>(<a class="code" href="classuserrec.html">userrec</a>* user,<span class="keywordtype">void</span>* dest,<span class="keywordtype">int</span> target_type, std::string text) { <span class="keywordflow">return</span> 0; }; +00125 +00126 <span class="comment">// server is a wrapper class that provides methods to all of the C-style</span> +00127 <span class="comment">// exports in the core</span> +00128 <span class="comment">//</span> +00129 +<a name="l00130"></a><a class="code" href="classServer.html#a0">00130</a> <a class="code" href="classServer.html#a0">Server::Server</a>() +00131 { +00132 } +00133 +<a name="l00134"></a><a class="code" href="classServer.html#a1">00134</a> <a class="code" href="classServer.html#a1">Server::~Server</a>() +00135 { +00136 } +00137 +<a name="l00138"></a><a class="code" href="classServer.html#a2">00138</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a2">Server::SendOpers</a>(std::string s) +00139 { +00140 WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str()); +00141 } +00142 +<a name="l00143"></a><a class="code" href="classServer.html#a22">00143</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a22">Server::SendToModeMask</a>(std::string modes, <span class="keywordtype">int</span> flags, std::string text) +00144 { +00145 WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str()); +00146 } +00147 +00148 <a class="code" href="classchanrec.html">chanrec</a>* Server::JoinUserToChannel(<a class="code" href="classuserrec.html">userrec</a>* user, std::string cname, std::string key) +00149 { +00150 <span class="keywordflow">return</span> add_channel(user,cname.c_str(),key.c_str()); +00151 } +00152 +00153 <a class="code" href="classchanrec.html">chanrec</a>* Server::PartUserFromChannel(<a class="code" href="classuserrec.html">userrec</a>* user, std::string cname, std::string reason) +00154 { +00155 <span class="keywordflow">return</span> del_channel(user,cname.c_str(),reason.c_str()); +00156 } +00157 +<a name="l00158"></a><a class="code" href="classServer.html#a25">00158</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a25">Server::ChangeUserNick</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string nickname) +00159 { +00160 force_nickchange(user,nickname.c_str()); +00161 } +00162 +<a name="l00163"></a><a class="code" href="classServer.html#a26">00163</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a26">Server::QuitUser</a>(<a class="code" href="classuserrec.html">userrec</a>* user, std::string reason) +00164 { +00165 kill_link(user,reason.c_str()); +00166 } +00167 +00168 +<a name="l00169"></a><a class="code" href="classServer.html#a3">00169</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a3">Server::Log</a>(<span class="keywordtype">int</span> level, std::string s) +00170 { +00171 log(level,<span class="stringliteral">"%s"</span>,s.c_str()); +00172 } +00173 +<a name="l00174"></a><a class="code" href="classServer.html#a20">00174</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a20">Server::AddCommand</a>(<span class="keywordtype">char</span>* cmd, handlerfunc f, <span class="keywordtype">char</span> flags, <span class="keywordtype">int</span> minparams) +00175 { +00176 <a class="code" href="modules_8h.html#a13">createcommand</a>(cmd,f,flags,minparams); +00177 } +00178 +<a name="l00179"></a><a class="code" href="classServer.html#a21">00179</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a21">Server::SendMode</a>(<span class="keywordtype">char</span> **parameters, <span class="keywordtype">int</span> pcnt, <a class="code" href="classuserrec.html">userrec</a> *user) +00180 { +00181 <a class="code" href="modules_8h.html#a14">server_mode</a>(parameters,pcnt,user); +00182 } +00183 +<a name="l00184"></a><a class="code" href="classServer.html#a4">00184</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a4">Server::Send</a>(<span class="keywordtype">int</span> Socket, std::string s) +00185 { +00186 Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str()); +00187 } +00188 +<a name="l00189"></a><a class="code" href="classServer.html#a5">00189</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a5">Server::SendServ</a>(<span class="keywordtype">int</span> Socket, std::string s) +00190 { +00191 WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str()); +00192 } +00193 +<a name="l00194"></a><a class="code" href="classServer.html#a6">00194</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a6">Server::SendFrom</a>(<span class="keywordtype">int</span> Socket, <a class="code" href="classuserrec.html">userrec</a>* User, std::string s) +00195 { +00196 WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str()); +00197 } +00198 +<a name="l00199"></a><a class="code" href="classServer.html#a7">00199</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a7">Server::SendTo</a>(<a class="code" href="classuserrec.html">userrec</a>* Source, <a class="code" href="classuserrec.html">userrec</a>* Dest, std::string s) +00200 { +00201 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str()); +00202 } +00203 +<a name="l00204"></a><a class="code" href="classServer.html#a8">00204</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a8">Server::SendChannel</a>(<a class="code" href="classuserrec.html">userrec</a>* User, <a class="code" href="classchanrec.html">chanrec</a>* Channel, std::string s,<span class="keywordtype">bool</span> IncludeSender) +00205 { +00206 <span class="keywordflow">if</span> (IncludeSender) +00207 { +00208 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str()); +00209 } +00210 <span class="keywordflow">else</span> +00211 { +00212 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str()); +00213 } +00214 } +00215 +<a name="l00216"></a><a class="code" href="classServer.html#a9">00216</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a9">Server::CommonChannels</a>(<a class="code" href="classuserrec.html">userrec</a>* u1, <a class="code" href="classuserrec.html">userrec</a>* u2) +00217 { +00218 <span class="keywordflow">return</span> (common_channels(u1,u2) != 0); +00219 } +00220 +<a name="l00221"></a><a class="code" href="classServer.html#a10">00221</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a10">Server::SendCommon</a>(<a class="code" href="classuserrec.html">userrec</a>* User, std::string text,<span class="keywordtype">bool</span> IncludeSender) +00222 { +00223 <span class="keywordflow">if</span> (IncludeSender) +00224 { +00225 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str()); +00226 } +00227 <span class="keywordflow">else</span> +00228 { +00229 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str()); +00230 } +00231 } +00232 +<a name="l00233"></a><a class="code" href="classServer.html#a11">00233</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a11">Server::SendWallops</a>(<a class="code" href="classuserrec.html">userrec</a>* User, std::string text) +00234 { +00235 WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str()); +00236 } +00237 +<a name="l00238"></a><a class="code" href="classServer.html#a12">00238</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a12">Server::IsNick</a>(std::string nick) +00239 { +00240 <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0); +00241 } +00242 +<a name="l00243"></a><a class="code" href="classServer.html#a13">00243</a> <a class="code" href="classuserrec.html">userrec</a>* <a class="code" href="classServer.html#a13">Server::FindNick</a>(std::string nick) +00244 { +00245 <span class="keywordflow">return</span> Find(nick); +00246 } +00247 +<a name="l00248"></a><a class="code" href="classServer.html#a14">00248</a> <a class="code" href="classchanrec.html">chanrec</a>* <a class="code" href="classServer.html#a14">Server::FindChannel</a>(std::string channel) +00249 { +00250 <span class="keywordflow">return</span> FindChan(channel.c_str()); +00251 } +00252 +<a name="l00253"></a><a class="code" href="classServer.html#a15">00253</a> std::string <a class="code" href="classServer.html#a15">Server::ChanMode</a>(<a class="code" href="classuserrec.html">userrec</a>* User, <a class="code" href="classchanrec.html">chanrec</a>* Chan) +00254 { +00255 <span class="keywordflow">return</span> cmode(User,Chan); +00256 } +00257 +<a name="l00258"></a><a class="code" href="classServer.html#a16">00258</a> std::string <a class="code" href="classServer.html#a16">Server::GetServerName</a>() +00259 { +00260 <span class="keywordflow">return</span> getservername(); +00261 } +00262 +<a name="l00263"></a><a class="code" href="classServer.html#a17">00263</a> std::string <a class="code" href="classServer.html#a17">Server::GetNetworkName</a>() +00264 { +00265 <span class="keywordflow">return</span> getnetworkname(); +00266 } +00267 +<a name="l00268"></a><a class="code" href="classServer.html#a18">00268</a> <a class="code" href="classAdmin.html">Admin</a> <a class="code" href="classServer.html#a18">Server::GetAdmin</a>() +00269 { +00270 <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick()); +00271 } 00272 -<a name="l00273"></a><a class="code" href="classServer.html#a19">00273</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a19">Server::AddExtendedMode</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type, <span class="keywordtype">bool</span> requires_oper, <span class="keywordtype">int</span> params_when_on, <span class="keywordtype">int</span> params_when_off) -00274 { -00275 <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#a7">MT_SERVER</a>) -00276 { -00277 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>); -00278 <span class="keywordflow">return</span> <span class="keyword">false</span>; -00279 } -00280 <span class="keywordflow">if</span> (((params_when_on>0) || (params_when_off>0)) && (type == <a class="code" href="modules_8h.html#a6">MT_CLIENT</a>)) -00281 { -00282 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>); -00283 <span class="keywordflow">return</span> <span class="keyword">false</span>; -00284 } -00285 <span class="keywordflow">if</span> ((params_when_on>1) || (params_when_off>1)) -00286 { -00287 log(DEBUG,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>); -00288 <span class="keywordflow">return</span> <span class="keyword">false</span>; -00289 } -00290 <span class="keywordflow">return</span> <a class="code" href="modules_8cpp.html#a8">DoAddExtendedMode</a>(modechar,type,requires_oper,params_when_on,params_when_off); -00291 } -00292 -00293 -<a name="l00294"></a><a class="code" href="classConfigReader.html#a0">00294</a> <a class="code" href="classConfigReader.html#a0">ConfigReader::ConfigReader</a>() -00295 { -00296 <a class="code" href="classConfigReader.html#n0">fname</a> = CONFIG_FILE; -00297 } -00298 -00299 -<a name="l00300"></a><a class="code" href="classConfigReader.html#a2">00300</a> <a class="code" href="classConfigReader.html#a2">ConfigReader::~ConfigReader</a>() -00301 { -00302 } -00303 -00304 -<a name="l00305"></a><a class="code" href="classConfigReader.html#a1">00305</a> <a class="code" href="classConfigReader.html#a0">ConfigReader::ConfigReader</a>(std::string filename) : fname(filename) { }; +00273 +00274 +<a name="l00275"></a><a class="code" href="classServer.html#a19">00275</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a19">Server::AddExtendedMode</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type, <span class="keywordtype">bool</span> requires_oper, <span class="keywordtype">int</span> params_when_on, <span class="keywordtype">int</span> params_when_off) +00276 { +00277 <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#a7">MT_SERVER</a>) +00278 { +00279 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>); +00280 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00281 } +00282 <span class="keywordflow">if</span> (((params_when_on>0) || (params_when_off>0)) && (type == <a class="code" href="modules_8h.html#a6">MT_CLIENT</a>)) +00283 { +00284 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>); +00285 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00286 } +00287 <span class="keywordflow">if</span> ((params_when_on>1) || (params_when_off>1)) +00288 { +00289 log(DEBUG,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>); +00290 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00291 } +00292 <span class="keywordflow">return</span> <a class="code" href="modules_8cpp.html#a8">DoAddExtendedMode</a>(modechar,type,requires_oper,params_when_on,params_when_off); +00293 } +00294 +00295 +<a name="l00296"></a><a class="code" href="classConfigReader.html#a0">00296</a> <a class="code" href="classConfigReader.html#a0">ConfigReader::ConfigReader</a>() +00297 { +00298 <a class="code" href="classConfigReader.html#n0">fname</a> = CONFIG_FILE; +00299 } +00300 +00301 +<a name="l00302"></a><a class="code" href="classConfigReader.html#a2">00302</a> <a class="code" href="classConfigReader.html#a2">ConfigReader::~ConfigReader</a>() +00303 { +00304 } +00305 00306 -<a name="l00307"></a><a class="code" href="classConfigReader.html#a3">00307</a> std::string <a class="code" href="classConfigReader.html#a3">ConfigReader::ReadValue</a>(std::string tag, std::string name, <span class="keywordtype">int</span> index) -00308 { -00309 <span class="keywordtype">char</span> val[MAXBUF]; -00310 ReadConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str(),name.c_str(),index,val); -00311 <span class="keywordflow">return</span> val; -00312 } -00313 -00314 -<a name="l00315"></a><a class="code" href="classConfigReader.html#a4">00315</a> <span class="keywordtype">int</span> <a class="code" href="classConfigReader.html#a4">ConfigReader::Enumerate</a>(std::string tag) -00316 { -00317 <span class="keywordflow">return</span> EnumConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str()); -00318 } -00319 -00320 -<a name="l00321"></a><a class="code" href="classConfigReader.html#a5">00321</a> <span class="keywordtype">bool</span> <a class="code" href="classConfigReader.html#a5">ConfigReader::Verify</a>() -00322 { -00323 <span class="keywordflow">return</span> <span class="keyword">true</span>; -00324 } -00325 -00326 -<a name="l00327"></a><a class="code" href="classFileReader.html#a1">00327</a> <a class="code" href="classFileReader.html#a0">FileReader::FileReader</a>(std::string filename) -00328 { -00329 <a class="code" href="modules_8h.html#a10">file_cache</a> c; -00330 readfile(c,filename.c_str()); -00331 this-><a class="code" href="classFileReader.html#o0">fc</a> = c; -00332 } -00333 -<a name="l00334"></a><a class="code" href="classFileReader.html#a0">00334</a> <a class="code" href="classFileReader.html#a0">FileReader::FileReader</a>() -00335 { -00336 } -00337 -<a name="l00338"></a><a class="code" href="classFileReader.html#a3">00338</a> <span class="keywordtype">void</span> <a class="code" href="classFileReader.html#a3">FileReader::LoadFile</a>(std::string filename) -00339 { -00340 <a class="code" href="modules_8h.html#a10">file_cache</a> c; -00341 readfile(c,filename.c_str()); -00342 this-><a class="code" href="classFileReader.html#o0">fc</a> = c; -00343 } -00344 -00345 -<a name="l00346"></a><a class="code" href="classFileReader.html#a2">00346</a> <a class="code" href="classFileReader.html#a2">FileReader::~FileReader</a>() -00347 { -00348 } -00349 -<a name="l00350"></a><a class="code" href="classFileReader.html#a4">00350</a> <span class="keywordtype">bool</span> <a class="code" href="classFileReader.html#a4">FileReader::Exists</a>() -00351 { -00352 <span class="keywordflow">if</span> (<a class="code" href="classFileReader.html#o0">fc</a>.size() == 0) -00353 { -00354 <span class="keywordflow">return</span>(false); -00355 } -00356 <span class="keywordflow">else</span> -00357 { -00358 <span class="keywordflow">return</span>(true); -00359 } -00360 } -00361 -<a name="l00362"></a><a class="code" href="classFileReader.html#a5">00362</a> std::string <a class="code" href="classFileReader.html#a5">FileReader::GetLine</a>(<span class="keywordtype">int</span> x) -00363 { -00364 <span class="keywordflow">if</span> ((x<0) || (x><a class="code" href="classFileReader.html#o0">fc</a>.size())) -00365 <span class="keywordflow">return</span> <span class="stringliteral">""</span>; -00366 <span class="keywordflow">return</span> <a class="code" href="classFileReader.html#o0">fc</a>[x]; -00367 } -00368 -<a name="l00369"></a><a class="code" href="classFileReader.html#a6">00369</a> <span class="keywordtype">int</span> <a class="code" href="classFileReader.html#a6">FileReader::FileSize</a>() -00370 { -00371 <span class="keywordflow">return</span> <a class="code" href="classFileReader.html#o0">fc</a>.size(); -00372 } -00373 -00374 -00375 std::vector<Module*> <a class="code" href="modules_8cpp.html#a9">modules</a>(255); -00376 std::vector<ircd_module*> <a class="code" href="modules_8cpp.html#a10">factory</a>(255); -00377 -<a name="l00378"></a><a class="code" href="modules_8cpp.html#a3">00378</a> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a3">MODCOUNT</a> = -1; +<a name="l00307"></a><a class="code" href="classConfigReader.html#a1">00307</a> <a class="code" href="classConfigReader.html#a0">ConfigReader::ConfigReader</a>(std::string filename) : fname(filename) { }; +00308 +<a name="l00309"></a><a class="code" href="classConfigReader.html#a3">00309</a> std::string <a class="code" href="classConfigReader.html#a3">ConfigReader::ReadValue</a>(std::string tag, std::string name, <span class="keywordtype">int</span> index) +00310 { +00311 <span class="keywordtype">char</span> val[MAXBUF]; +00312 ReadConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str(),name.c_str(),index,val); +00313 <span class="keywordflow">return</span> val; +00314 } +00315 +00316 +<a name="l00317"></a><a class="code" href="classConfigReader.html#a4">00317</a> <span class="keywordtype">int</span> <a class="code" href="classConfigReader.html#a4">ConfigReader::Enumerate</a>(std::string tag) +00318 { +00319 <span class="keywordflow">return</span> EnumConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str()); +00320 } +00321 +00322 +<a name="l00323"></a><a class="code" href="classConfigReader.html#a5">00323</a> <span class="keywordtype">bool</span> <a class="code" href="classConfigReader.html#a5">ConfigReader::Verify</a>() +00324 { +00325 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00326 } +00327 +00328 +<a name="l00329"></a><a class="code" href="classFileReader.html#a1">00329</a> <a class="code" href="classFileReader.html#a0">FileReader::FileReader</a>(std::string filename) +00330 { +00331 <a class="code" href="modules_8h.html#a10">file_cache</a> c; +00332 readfile(c,filename.c_str()); +00333 this-><a class="code" href="classFileReader.html#o0">fc</a> = c; +00334 } +00335 +<a name="l00336"></a><a class="code" href="classFileReader.html#a0">00336</a> <a class="code" href="classFileReader.html#a0">FileReader::FileReader</a>() +00337 { +00338 } +00339 +<a name="l00340"></a><a class="code" href="classFileReader.html#a3">00340</a> <span class="keywordtype">void</span> <a class="code" href="classFileReader.html#a3">FileReader::LoadFile</a>(std::string filename) +00341 { +00342 <a class="code" href="modules_8h.html#a10">file_cache</a> c; +00343 readfile(c,filename.c_str()); +00344 this-><a class="code" href="classFileReader.html#o0">fc</a> = c; +00345 } +00346 +00347 +<a name="l00348"></a><a class="code" href="classFileReader.html#a2">00348</a> <a class="code" href="classFileReader.html#a2">FileReader::~FileReader</a>() +00349 { +00350 } +00351 +<a name="l00352"></a><a class="code" href="classFileReader.html#a4">00352</a> <span class="keywordtype">bool</span> <a class="code" href="classFileReader.html#a4">FileReader::Exists</a>() +00353 { +00354 <span class="keywordflow">if</span> (<a class="code" href="classFileReader.html#o0">fc</a>.size() == 0) +00355 { +00356 <span class="keywordflow">return</span>(false); +00357 } +00358 <span class="keywordflow">else</span> +00359 { +00360 <span class="keywordflow">return</span>(true); +00361 } +00362 } +00363 +<a name="l00364"></a><a class="code" href="classFileReader.html#a5">00364</a> std::string <a class="code" href="classFileReader.html#a5">FileReader::GetLine</a>(<span class="keywordtype">int</span> x) +00365 { +00366 <span class="keywordflow">if</span> ((x<0) || (x><a class="code" href="classFileReader.html#o0">fc</a>.size())) +00367 <span class="keywordflow">return</span> <span class="stringliteral">""</span>; +00368 <span class="keywordflow">return</span> <a class="code" href="classFileReader.html#o0">fc</a>[x]; +00369 } +00370 +<a name="l00371"></a><a class="code" href="classFileReader.html#a6">00371</a> <span class="keywordtype">int</span> <a class="code" href="classFileReader.html#a6">FileReader::FileSize</a>() +00372 { +00373 <span class="keywordflow">return</span> <a class="code" href="classFileReader.html#o0">fc</a>.size(); +00374 } +00375 +00376 +00377 std::vector<Module*> <a class="code" href="modules_8cpp.html#a9">modules</a>(255); +00378 std::vector<ircd_module*> <a class="code" href="modules_8cpp.html#a10">factory</a>(255); 00379 -00380 -</pre></div><hr><address style="align: right;"><small>Generated on Tue Apr 6 11:42:30 2004 for InspIRCd by +<a name="l00380"></a><a class="code" href="modules_8cpp.html#a3">00380</a> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a3">MODCOUNT</a> = -1; +00381 +00382 +</pre></div><hr><address style="align: right;"><small>Generated on Tue Apr 6 21:13:19 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> |