diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-03 15:46:53 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-03 15:46:53 +0000 |
commit | abdb186046bcdd83aefbc4171a00bd1ad7ec963c (patch) | |
tree | 8fad649a8a767a12e19c0eef85d78d5f4ef04618 /docs/module-doc/modules_8cpp-source.html | |
parent | 8a1923c253a798f0823cc87d3cfdef012c533871 (diff) |
Added support for module-defined chanmodes with no parameters
Fixed minor typo in example conf
Added new stylesheet and docs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@362 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/module-doc/modules_8cpp-source.html')
-rw-r--r-- | docs/module-doc/modules_8cpp-source.html | 533 |
1 files changed, 270 insertions, 263 deletions
diff --git a/docs/module-doc/modules_8cpp-source.html b/docs/module-doc/modules_8cpp-source.html index 7e31fec1d..2f2b820a9 100644 --- a/docs/module-doc/modules_8cpp-source.html +++ b/docs/module-doc/modules_8cpp-source.html @@ -1,7 +1,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>modules.cpp Source File</title> -<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="inspircd.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.3-rc3 --> <center> @@ -41,287 +41,294 @@ 00033 <span class="comment">// returns true if an extended mode character is in use</span> <a name="l00034"></a><a class="code" href="modules_8cpp.html#a4">00034</a> <span class="keywordtype">bool</span> <a class="code" href="modules_8cpp.html#a4">ModeDefined</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type) 00035 { -00036 <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a1">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a2">EMode</a>.begin(); i < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++) -00037 { -00038 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type)) -00039 { -00040 <span class="keywordflow">return</span> <span class="keyword">true</span>; -00041 } -00042 } -00043 <span class="keywordflow">return</span> <span class="keyword">false</span>; -00044 } -00045 -00046 <span class="comment">// returns number of parameters for a custom mode when it is switched on</span> -<a name="l00047"></a><a class="code" href="modules_8cpp.html#a5">00047</a> <span class="keywordtype">bool</span> <a class="code" href="modules_8cpp.html#a5">ModeDefinedOn</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type) -00048 { -00049 <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a1">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a2">EMode</a>.begin(); i < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++) -00050 { -00051 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type)) -00052 { -00053 <span class="keywordflow">return</span> i->params_when_on; -00054 } -00055 } -00056 <span class="keywordflow">return</span> 0; -00057 } -00058 -00059 <span class="comment">// returns number of parameters for a custom mode when it is switched on</span> -<a name="l00060"></a><a class="code" href="modules_8cpp.html#a6">00060</a> <span class="keywordtype">bool</span> <a class="code" href="modules_8cpp.html#a6">ModeDefinedOff</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type) -00061 { -00062 <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a1">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a2">EMode</a>.begin(); i < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++) -00063 { -00064 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type)) -00065 { -00066 <span class="keywordflow">return</span> i->params_when_off; -00067 } -00068 } -00069 <span class="keywordflow">return</span> 0; -00070 } -00071 -00072 <span class="comment">// returns true if an extended mode character is in use</span> -<a name="l00073"></a><a class="code" href="modules_8cpp.html#a7">00073</a> <span class="keywordtype">bool</span> <a class="code" href="modules_8cpp.html#a7">AddExtendedMode</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type, <span class="keywordtype">bool</span> default_on, <span class="keywordtype">int</span> params_on, <span class="keywordtype">int</span> params_off) -00074 { -00075 <a class="code" href="modules_8cpp.html#a2">EMode</a>.push_back( <a class="code" href="classExtMode.html">ExtMode</a> (modechar,type,default_on,params_on,params_off)); -00076 <span class="keywordflow">return</span> <span class="keyword">true</span>; -00077 } -00078 -00079 -00080 <span class="comment">// version is a simple class for holding a modules version number</span> -00081 -<a name="l00082"></a><a class="code" href="classVersion.html#a0">00082</a> <a class="code" href="classVersion.html#a0">Version::Version</a>(<span class="keywordtype">int</span> major, <span class="keywordtype">int</span> minor, <span class="keywordtype">int</span> revision, <span class="keywordtype">int</span> build) : Major(major), Minor(minor), Revision(revision), Build(build) { }; +00036 log(DEBUG,<span class="stringliteral">"Size of extmodes vector is %d"</span>,<a class="code" href="modules_8cpp.html#a2">EMode</a>.size()); +00037 <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a1">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a2">EMode</a>.begin(); i < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++) +00038 { +00039 log(DEBUG,<span class="stringliteral">"i->modechar==%c, modechar=%c, i->type=%d, type=%d"</span>,i->modechar,modechar,i->type,type); +00040 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type)) +00041 { +00042 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00043 } +00044 } +00045 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00046 } +00047 +00048 <span class="comment">// returns number of parameters for a custom mode when it is switched on</span> +<a name="l00049"></a><a class="code" href="modules_8cpp.html#a5">00049</a> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a5">ModeDefinedOn</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type) +00050 { +00051 <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a1">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a2">EMode</a>.begin(); i < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++) +00052 { +00053 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type)) +00054 { +00055 <span class="keywordflow">return</span> i->params_when_on; +00056 } +00057 } +00058 <span class="keywordflow">return</span> 0; +00059 } +00060 +00061 <span class="comment">// returns number of parameters for a custom mode when it is switched on</span> +<a name="l00062"></a><a class="code" href="modules_8cpp.html#a6">00062</a> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a6">ModeDefinedOff</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type) +00063 { +00064 <span class="keywordflow">for</span> (<a class="code" href="modules_8cpp.html#a1">ExtModeListIter</a> i = <a class="code" href="modules_8cpp.html#a2">EMode</a>.begin(); i < <a class="code" href="modules_8cpp.html#a2">EMode</a>.end(); i++) +00065 { +00066 <span class="keywordflow">if</span> ((i->modechar == modechar) && (i->type == type)) +00067 { +00068 <span class="keywordflow">return</span> i->params_when_off; +00069 } +00070 } +00071 <span class="keywordflow">return</span> 0; +00072 } +00073 +00074 <span class="comment">// returns true if an extended mode character is in use</span> +<a name="l00075"></a><a class="code" href="modules_8cpp.html#a7">00075</a> <span class="keywordtype">bool</span> <a class="code" href="modules_8cpp.html#a7">DoAddExtendedMode</a>(<span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type, <span class="keywordtype">bool</span> default_on, <span class="keywordtype">int</span> params_on, <span class="keywordtype">int</span> params_off) +00076 { +00077 <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#a4">ModeDefined</a>(modechar,type)) { +00078 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00079 } +00080 <a class="code" href="modules_8cpp.html#a2">EMode</a>.push_back(<a class="code" href="classExtMode.html">ExtMode</a>(modechar,type,default_on,params_on,params_off)); +00081 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00082 } 00083 -00084 <span class="comment">// admin is a simple class for holding a server's administrative info</span> -00085 -<a name="l00086"></a><a class="code" href="classAdmin.html#a0">00086</a> <a class="code" href="classAdmin.html#a0">Admin::Admin</a>(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { }; -00087 -<a name="l00088"></a><a class="code" href="classModule.html#a0">00088</a> <a class="code" href="classModule.html#a0">Module::Module</a>() { } -<a name="l00089"></a><a class="code" href="classModule.html#a1">00089</a> <a class="code" href="classModule.html#a1">Module::~Module</a>() { } -<a name="l00090"></a><a class="code" href="classModule.html#a3">00090</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a3">Module::OnUserConnect</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { } -<a name="l00091"></a><a class="code" href="classModule.html#a4">00091</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a4">Module::OnUserQuit</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { } -<a name="l00092"></a><a class="code" href="classModule.html#a5">00092</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a5">Module::OnUserJoin</a>(<a class="code" href="classuserrec.html">userrec</a>* user, <a class="code" href="classchanrec.html">chanrec</a>* channel) { } -<a name="l00093"></a><a class="code" href="classModule.html#a6">00093</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a6">Module::OnUserPart</a>(<a class="code" href="classuserrec.html">userrec</a>* user, <a class="code" href="classchanrec.html">chanrec</a>* channel) { } -00094 <span class="keywordtype">void</span> Module::OnPacketTransmit(<span class="keywordtype">char</span> *p) { } -00095 <span class="keywordtype">void</span> Module::OnPacketReceive(<span class="keywordtype">char</span> *p) { } -<a name="l00096"></a><a class="code" href="classModule.html#a9">00096</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a9">Module::OnRehash</a>() { } -<a name="l00097"></a><a class="code" href="classModule.html#a10">00097</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a10">Module::OnServerRaw</a>(std::string &raw, <span class="keywordtype">bool</span> inbound) { } -<a name="l00098"></a><a class="code" href="classModule.html#a11">00098</a> <span class="keywordtype">bool</span> <a class="code" href="classModule.html#a11">Module::OnExtendedMode</a>(<a class="code" href="classuserrec.html">userrec</a>* user, <a class="code" href="classchanrec.html">chanrec</a>* chan, <span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type, <span class="keywordtype">bool</span> mode_on, string_list &params) { } -<a name="l00099"></a><a class="code" href="classModule.html#a2">00099</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); } -00100 -00101 <span class="comment">// server is a wrapper class that provides methods to all of the C-style</span> -00102 <span class="comment">// exports in the core</span> -00103 <span class="comment">//</span> -00104 -<a name="l00105"></a><a class="code" href="classServer.html#a0">00105</a> <a class="code" href="classServer.html#a0">Server::Server</a>() -00106 { -00107 } -00108 -<a name="l00109"></a><a class="code" href="classServer.html#a1">00109</a> <a class="code" href="classServer.html#a1">Server::~Server</a>() -00110 { -00111 } -00112 -<a name="l00113"></a><a class="code" href="classServer.html#a2">00113</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a2">Server::SendOpers</a>(std::string s) -00114 { -00115 WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str()); -00116 } -00117 -<a name="l00118"></a><a class="code" href="classServer.html#a3">00118</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) -00119 { -00120 log(level,<span class="stringliteral">"%s"</span>,s.c_str()); -00121 } -00122 -<a name="l00123"></a><a class="code" href="classServer.html#a20">00123</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) -00124 { -00125 <a class="code" href="modules_8h.html#a12">createcommand</a>(cmd,f,flags,minparams); -00126 } -00127 -<a name="l00128"></a><a class="code" href="classServer.html#a21">00128</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) -00129 { -00130 <a class="code" href="modules_8h.html#a13">server_mode</a>(parameters,pcnt,user); -00131 } -00132 -<a name="l00133"></a><a class="code" href="classServer.html#a4">00133</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) -00134 { -00135 Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str()); -00136 } -00137 -<a name="l00138"></a><a class="code" href="classServer.html#a5">00138</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) -00139 { -00140 WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str()); -00141 } -00142 -<a name="l00143"></a><a class="code" href="classServer.html#a6">00143</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) -00144 { -00145 WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str()); -00146 } -00147 -<a name="l00148"></a><a class="code" href="classServer.html#a7">00148</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) -00149 { -00150 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str()); -00151 } -00152 -<a name="l00153"></a><a class="code" href="classServer.html#a8">00153</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) -00154 { -00155 <span class="keywordflow">if</span> (IncludeSender) -00156 { -00157 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str()); -00158 } -00159 <span class="keywordflow">else</span> -00160 { -00161 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str()); -00162 } -00163 } -00164 -<a name="l00165"></a><a class="code" href="classServer.html#a9">00165</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) -00166 { -00167 <span class="keywordflow">return</span> (common_channels(u1,u2) != 0); -00168 } -00169 -<a name="l00170"></a><a class="code" href="classServer.html#a10">00170</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) -00171 { -00172 <span class="keywordflow">if</span> (IncludeSender) -00173 { -00174 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str()); -00175 } -00176 <span class="keywordflow">else</span> -00177 { -00178 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str()); -00179 } -00180 } -00181 -<a name="l00182"></a><a class="code" href="classServer.html#a11">00182</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) -00183 { -00184 WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str()); -00185 } -00186 -<a name="l00187"></a><a class="code" href="classServer.html#a12">00187</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a12">Server::IsNick</a>(std::string nick) -00188 { -00189 <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0); -00190 } -00191 -<a name="l00192"></a><a class="code" href="classServer.html#a13">00192</a> <a class="code" href="classuserrec.html">userrec</a>* <a class="code" href="classServer.html#a13">Server::FindNick</a>(std::string nick) -00193 { -00194 <span class="keywordflow">return</span> Find(nick); -00195 } -00196 -<a name="l00197"></a><a class="code" href="classServer.html#a14">00197</a> <a class="code" href="classchanrec.html">chanrec</a>* <a class="code" href="classServer.html#a14">Server::FindChannel</a>(std::string channel) -00198 { -00199 <span class="keywordflow">return</span> FindChan(channel.c_str()); -00200 } -00201 -<a name="l00202"></a><a class="code" href="classServer.html#a15">00202</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) -00203 { -00204 <span class="keywordflow">return</span> cmode(User,Chan); -00205 } -00206 -<a name="l00207"></a><a class="code" href="classServer.html#a16">00207</a> std::string <a class="code" href="classServer.html#a16">Server::GetServerName</a>() -00208 { -00209 <span class="keywordflow">return</span> getservername(); -00210 } -00211 -<a name="l00212"></a><a class="code" href="classServer.html#a17">00212</a> std::string <a class="code" href="classServer.html#a17">Server::GetNetworkName</a>() -00213 { -00214 <span class="keywordflow">return</span> getnetworkname(); -00215 } -00216 -<a name="l00217"></a><a class="code" href="classServer.html#a18">00217</a> <a class="code" href="classAdmin.html">Admin</a> <a class="code" href="classServer.html#a18">Server::GetAdmin</a>() -00218 { -00219 <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick()); -00220 } -00221 +00084 +00085 <span class="comment">// version is a simple class for holding a modules version number</span> +00086 +<a name="l00087"></a><a class="code" href="classVersion.html#a0">00087</a> <a class="code" href="classVersion.html#a0">Version::Version</a>(<span class="keywordtype">int</span> major, <span class="keywordtype">int</span> minor, <span class="keywordtype">int</span> revision, <span class="keywordtype">int</span> build) : Major(major), Minor(minor), Revision(revision), Build(build) { }; +00088 +00089 <span class="comment">// admin is a simple class for holding a server's administrative info</span> +00090 +<a name="l00091"></a><a class="code" href="classAdmin.html#a0">00091</a> <a class="code" href="classAdmin.html#a0">Admin::Admin</a>(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { }; +00092 +<a name="l00093"></a><a class="code" href="classModule.html#a0">00093</a> <a class="code" href="classModule.html#a0">Module::Module</a>() { } +<a name="l00094"></a><a class="code" href="classModule.html#a1">00094</a> <a class="code" href="classModule.html#a1">Module::~Module</a>() { } +<a name="l00095"></a><a class="code" href="classModule.html#a3">00095</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a3">Module::OnUserConnect</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { } +<a name="l00096"></a><a class="code" href="classModule.html#a4">00096</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a4">Module::OnUserQuit</a>(<a class="code" href="classuserrec.html">userrec</a>* user) { } +<a name="l00097"></a><a class="code" href="classModule.html#a5">00097</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a5">Module::OnUserJoin</a>(<a class="code" href="classuserrec.html">userrec</a>* user, <a class="code" href="classchanrec.html">chanrec</a>* channel) { } +<a name="l00098"></a><a class="code" href="classModule.html#a6">00098</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a6">Module::OnUserPart</a>(<a class="code" href="classuserrec.html">userrec</a>* user, <a class="code" href="classchanrec.html">chanrec</a>* channel) { } +<a name="l00099"></a><a class="code" href="classModule.html#a7">00099</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a7">Module::OnPacketTransmit</a>(<span class="keywordtype">char</span> *p) { } +<a name="l00100"></a><a class="code" href="classModule.html#a8">00100</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a8">Module::OnPacketReceive</a>(<span class="keywordtype">char</span> *p) { } +<a name="l00101"></a><a class="code" href="classModule.html#a9">00101</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a9">Module::OnRehash</a>() { } +<a name="l00102"></a><a class="code" href="classModule.html#a10">00102</a> <span class="keywordtype">void</span> <a class="code" href="classModule.html#a10">Module::OnServerRaw</a>(std::string &raw, <span class="keywordtype">bool</span> inbound) { } +00103 <span class="keywordtype">int</span> Module::OnUserPreJoin(<a class="code" href="classuserrec.html">userrec</a>* user, <a class="code" href="classchanrec.html">chanrec</a>* chan, <span class="keywordtype">char</span>* cname) { <span class="keywordflow">return</span> 0; } +<a name="l00104"></a><a class="code" href="classModule.html#a11">00104</a> <span class="keywordtype">bool</span> <a class="code" href="classModule.html#a11">Module::OnExtendedMode</a>(<a class="code" href="classuserrec.html">userrec</a>* user, <a class="code" href="classchanrec.html">chanrec</a>* chan, <span class="keywordtype">char</span> modechar, <span class="keywordtype">int</span> type, <span class="keywordtype">bool</span> mode_on, string_list &params) { } +<a name="l00105"></a><a class="code" href="classModule.html#a2">00105</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); } +00106 +00107 <span class="comment">// server is a wrapper class that provides methods to all of the C-style</span> +00108 <span class="comment">// exports in the core</span> +00109 <span class="comment">//</span> +00110 +<a name="l00111"></a><a class="code" href="classServer.html#a0">00111</a> <a class="code" href="classServer.html#a0">Server::Server</a>() +00112 { +00113 } +00114 +<a name="l00115"></a><a class="code" href="classServer.html#a1">00115</a> <a class="code" href="classServer.html#a1">Server::~Server</a>() +00116 { +00117 } +00118 +<a name="l00119"></a><a class="code" href="classServer.html#a2">00119</a> <span class="keywordtype">void</span> <a class="code" href="classServer.html#a2">Server::SendOpers</a>(std::string s) +00120 { +00121 WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str()); +00122 } +00123 +<a name="l00124"></a><a class="code" href="classServer.html#a3">00124</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) +00125 { +00126 log(level,<span class="stringliteral">"%s"</span>,s.c_str()); +00127 } +00128 +<a name="l00129"></a><a class="code" href="classServer.html#a20">00129</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) +00130 { +00131 <a class="code" href="modules_8h.html#a13">createcommand</a>(cmd,f,flags,minparams); +00132 } +00133 +<a name="l00134"></a><a class="code" href="classServer.html#a21">00134</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) +00135 { +00136 <a class="code" href="modules_8h.html#a14">server_mode</a>(parameters,pcnt,user); +00137 } +00138 +<a name="l00139"></a><a class="code" href="classServer.html#a4">00139</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) +00140 { +00141 Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str()); +00142 } +00143 +<a name="l00144"></a><a class="code" href="classServer.html#a5">00144</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) +00145 { +00146 WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str()); +00147 } +00148 +<a name="l00149"></a><a class="code" href="classServer.html#a6">00149</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) +00150 { +00151 WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str()); +00152 } +00153 +<a name="l00154"></a><a class="code" href="classServer.html#a7">00154</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) +00155 { +00156 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str()); +00157 } +00158 +<a name="l00159"></a><a class="code" href="classServer.html#a8">00159</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) +00160 { +00161 <span class="keywordflow">if</span> (IncludeSender) +00162 { +00163 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str()); +00164 } +00165 <span class="keywordflow">else</span> +00166 { +00167 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str()); +00168 } +00169 } +00170 +<a name="l00171"></a><a class="code" href="classServer.html#a9">00171</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) +00172 { +00173 <span class="keywordflow">return</span> (common_channels(u1,u2) != 0); +00174 } +00175 +<a name="l00176"></a><a class="code" href="classServer.html#a10">00176</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) +00177 { +00178 <span class="keywordflow">if</span> (IncludeSender) +00179 { +00180 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str()); +00181 } +00182 <span class="keywordflow">else</span> +00183 { +00184 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str()); +00185 } +00186 } +00187 +<a name="l00188"></a><a class="code" href="classServer.html#a11">00188</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) +00189 { +00190 WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str()); +00191 } +00192 +<a name="l00193"></a><a class="code" href="classServer.html#a12">00193</a> <span class="keywordtype">bool</span> <a class="code" href="classServer.html#a12">Server::IsNick</a>(std::string nick) +00194 { +00195 <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0); +00196 } +00197 +<a name="l00198"></a><a class="code" href="classServer.html#a13">00198</a> <a class="code" href="classuserrec.html">userrec</a>* <a class="code" href="classServer.html#a13">Server::FindNick</a>(std::string nick) +00199 { +00200 <span class="keywordflow">return</span> Find(nick); +00201 } +00202 +<a name="l00203"></a><a class="code" href="classServer.html#a14">00203</a> <a class="code" href="classchanrec.html">chanrec</a>* <a class="code" href="classServer.html#a14">Server::FindChannel</a>(std::string channel) +00204 { +00205 <span class="keywordflow">return</span> FindChan(channel.c_str()); +00206 } +00207 +<a name="l00208"></a><a class="code" href="classServer.html#a15">00208</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) +00209 { +00210 <span class="keywordflow">return</span> cmode(User,Chan); +00211 } +00212 +<a name="l00213"></a><a class="code" href="classServer.html#a16">00213</a> std::string <a class="code" href="classServer.html#a16">Server::GetServerName</a>() +00214 { +00215 <span class="keywordflow">return</span> getservername(); +00216 } +00217 +<a name="l00218"></a><a class="code" href="classServer.html#a17">00218</a> std::string <a class="code" href="classServer.html#a17">Server::GetNetworkName</a>() +00219 { +00220 <span class="keywordflow">return</span> getnetworkname(); +00221 } 00222 -00223 -<a name="l00224"></a><a class="code" href="classServer.html#a19">00224</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> default_on, <span class="keywordtype">int</span> params_when_on, <span class="keywordtype">int</span> params_when_off) -00225 { +<a name="l00223"></a><a class="code" href="classServer.html#a18">00223</a> <a class="code" href="classAdmin.html">Admin</a> <a class="code" href="classServer.html#a18">Server::GetAdmin</a>() +00224 { +00225 <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick()); 00226 } 00227 00228 -<a name="l00229"></a><a class="code" href="classConfigReader.html#a0">00229</a> <a class="code" href="classConfigReader.html#a0">ConfigReader::ConfigReader</a>() -00230 { -00231 <a class="code" href="classConfigReader.html#n0">fname</a> = CONFIG_FILE; -00232 } -00233 +00229 +<a name="l00230"></a><a class="code" href="classServer.html#a19">00230</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> default_on, <span class="keywordtype">int</span> params_when_on, <span class="keywordtype">int</span> params_when_off) +00231 { +00232 <span class="keywordflow">return</span> <a class="code" href="modules_8cpp.html#a7">DoAddExtendedMode</a>(modechar,type,default_on,params_when_on,params_when_off); +00233 } 00234 -<a name="l00235"></a><a class="code" href="classConfigReader.html#a2">00235</a> <a class="code" href="classConfigReader.html#a2">ConfigReader::~ConfigReader</a>() -00236 { -00237 } -00238 -00239 -<a name="l00240"></a><a class="code" href="classConfigReader.html#a1">00240</a> <a class="code" href="classConfigReader.html#a0">ConfigReader::ConfigReader</a>(std::string filename) : fname(filename) { }; +00235 +<a name="l00236"></a><a class="code" href="classConfigReader.html#a0">00236</a> <a class="code" href="classConfigReader.html#a0">ConfigReader::ConfigReader</a>() +00237 { +00238 <a class="code" href="classConfigReader.html#n0">fname</a> = CONFIG_FILE; +00239 } +00240 00241 -<a name="l00242"></a><a class="code" href="classConfigReader.html#a3">00242</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) +<a name="l00242"></a><a class="code" href="classConfigReader.html#a2">00242</a> <a class="code" href="classConfigReader.html#a2">ConfigReader::~ConfigReader</a>() 00243 { -00244 <span class="keywordtype">char</span> val[MAXBUF]; -00245 ReadConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str(),name.c_str(),index,val); -00246 <span class="keywordflow">return</span> val; -00247 } +00244 } +00245 +00246 +<a name="l00247"></a><a class="code" href="classConfigReader.html#a1">00247</a> <a class="code" href="classConfigReader.html#a0">ConfigReader::ConfigReader</a>(std::string filename) : fname(filename) { }; 00248 -00249 -<a name="l00250"></a><a class="code" href="classConfigReader.html#a4">00250</a> <span class="keywordtype">int</span> <a class="code" href="classConfigReader.html#a4">ConfigReader::Enumerate</a>(std::string tag) -00251 { -00252 <span class="keywordflow">return</span> EnumConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str()); -00253 } -00254 +<a name="l00249"></a><a class="code" href="classConfigReader.html#a3">00249</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) +00250 { +00251 <span class="keywordtype">char</span> val[MAXBUF]; +00252 ReadConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str(),name.c_str(),index,val); +00253 <span class="keywordflow">return</span> val; +00254 } 00255 -<a name="l00256"></a><a class="code" href="classConfigReader.html#a5">00256</a> <span class="keywordtype">bool</span> <a class="code" href="classConfigReader.html#a5">ConfigReader::Verify</a>() -00257 { -00258 <span class="keywordflow">return</span> <span class="keyword">true</span>; -00259 } -00260 +00256 +<a name="l00257"></a><a class="code" href="classConfigReader.html#a4">00257</a> <span class="keywordtype">int</span> <a class="code" href="classConfigReader.html#a4">ConfigReader::Enumerate</a>(std::string tag) +00258 { +00259 <span class="keywordflow">return</span> EnumConf(<a class="code" href="classConfigReader.html#n0">fname</a>.c_str(),tag.c_str()); +00260 } 00261 -<a name="l00262"></a><a class="code" href="classFileReader.html#a1">00262</a> <a class="code" href="classFileReader.html#a0">FileReader::FileReader</a>(std::string filename) -00263 { -00264 <a class="code" href="modules_8h.html#a9">file_cache</a> c; -00265 readfile(c,filename.c_str()); -00266 this-><a class="code" href="classFileReader.html#o0">fc</a> = c; -00267 } +00262 +<a name="l00263"></a><a class="code" href="classConfigReader.html#a5">00263</a> <span class="keywordtype">bool</span> <a class="code" href="classConfigReader.html#a5">ConfigReader::Verify</a>() +00264 { +00265 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00266 } +00267 00268 -<a name="l00269"></a><a class="code" href="classFileReader.html#a0">00269</a> <a class="code" href="classFileReader.html#a0">FileReader::FileReader</a>() +<a name="l00269"></a><a class="code" href="classFileReader.html#a1">00269</a> <a class="code" href="classFileReader.html#a0">FileReader::FileReader</a>(std::string filename) 00270 { -00271 } -00272 -<a name="l00273"></a><a class="code" href="classFileReader.html#a3">00273</a> <span class="keywordtype">void</span> <a class="code" href="classFileReader.html#a3">FileReader::LoadFile</a>(std::string filename) -00274 { -00275 <a class="code" href="modules_8h.html#a9">file_cache</a> c; -00276 readfile(c,filename.c_str()); -00277 this-><a class="code" href="classFileReader.html#o0">fc</a> = c; +00271 <a class="code" href="modules_8h.html#a10">file_cache</a> c; +00272 readfile(c,filename.c_str()); +00273 this-><a class="code" href="classFileReader.html#o0">fc</a> = c; +00274 } +00275 +<a name="l00276"></a><a class="code" href="classFileReader.html#a0">00276</a> <a class="code" href="classFileReader.html#a0">FileReader::FileReader</a>() +00277 { 00278 } 00279 -00280 -<a name="l00281"></a><a class="code" href="classFileReader.html#a2">00281</a> <a class="code" href="classFileReader.html#a2">FileReader::~FileReader</a>() -00282 { -00283 } -00284 -<a name="l00285"></a><a class="code" href="classFileReader.html#a4">00285</a> <span class="keywordtype">bool</span> <a class="code" href="classFileReader.html#a4">FileReader::Exists</a>() -00286 { -00287 <span class="keywordflow">if</span> (<a class="code" href="classFileReader.html#o0">fc</a>.size() == 0) -00288 { -00289 <span class="keywordflow">return</span>(false); -00290 } -00291 <span class="keywordflow">else</span> -00292 { -00293 <span class="keywordflow">return</span>(true); -00294 } -00295 } -00296 -<a name="l00297"></a><a class="code" href="classFileReader.html#a5">00297</a> std::string <a class="code" href="classFileReader.html#a5">FileReader::GetLine</a>(<span class="keywordtype">int</span> x) -00298 { -00299 <span class="keywordflow">if</span> ((x<0) || (x><a class="code" href="classFileReader.html#o0">fc</a>.size())) -00300 <span class="keywordflow">return</span> <span class="stringliteral">""</span>; -00301 <span class="keywordflow">return</span> <a class="code" href="classFileReader.html#o0">fc</a>[x]; +<a name="l00280"></a><a class="code" href="classFileReader.html#a3">00280</a> <span class="keywordtype">void</span> <a class="code" href="classFileReader.html#a3">FileReader::LoadFile</a>(std::string filename) +00281 { +00282 <a class="code" href="modules_8h.html#a10">file_cache</a> c; +00283 readfile(c,filename.c_str()); +00284 this-><a class="code" href="classFileReader.html#o0">fc</a> = c; +00285 } +00286 +00287 +<a name="l00288"></a><a class="code" href="classFileReader.html#a2">00288</a> <a class="code" href="classFileReader.html#a2">FileReader::~FileReader</a>() +00289 { +00290 } +00291 +<a name="l00292"></a><a class="code" href="classFileReader.html#a4">00292</a> <span class="keywordtype">bool</span> <a class="code" href="classFileReader.html#a4">FileReader::Exists</a>() +00293 { +00294 <span class="keywordflow">if</span> (<a class="code" href="classFileReader.html#o0">fc</a>.size() == 0) +00295 { +00296 <span class="keywordflow">return</span>(false); +00297 } +00298 <span class="keywordflow">else</span> +00299 { +00300 <span class="keywordflow">return</span>(true); +00301 } 00302 } 00303 -<a name="l00304"></a><a class="code" href="classFileReader.html#a6">00304</a> <span class="keywordtype">int</span> <a class="code" href="classFileReader.html#a6">FileReader::FileSize</a>() +<a name="l00304"></a><a class="code" href="classFileReader.html#a5">00304</a> std::string <a class="code" href="classFileReader.html#a5">FileReader::GetLine</a>(<span class="keywordtype">int</span> x) 00305 { -00306 <span class="keywordflow">return</span> <a class="code" href="classFileReader.html#o0">fc</a>.size(); -00307 } -00308 -00309 -00310 std::vector<Module*> <a class="code" href="modules_8cpp.html#a8">modules</a>(255); -00311 std::vector<ircd_module*> <a class="code" href="modules_8cpp.html#a9">factory</a>(255); -00312 -<a name="l00313"></a><a class="code" href="modules_8cpp.html#a3">00313</a> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a3">MODCOUNT</a> = -1; -00314 +00306 <span class="keywordflow">if</span> ((x<0) || (x><a class="code" href="classFileReader.html#o0">fc</a>.size())) +00307 <span class="keywordflow">return</span> <span class="stringliteral">""</span>; +00308 <span class="keywordflow">return</span> <a class="code" href="classFileReader.html#o0">fc</a>[x]; +00309 } +00310 +<a name="l00311"></a><a class="code" href="classFileReader.html#a6">00311</a> <span class="keywordtype">int</span> <a class="code" href="classFileReader.html#a6">FileReader::FileSize</a>() +00312 { +00313 <span class="keywordflow">return</span> <a class="code" href="classFileReader.html#o0">fc</a>.size(); +00314 } 00315 -</pre></div><hr><address style="align: right;"><small>Generated on Fri Apr 2 14:46:05 2004 for InspIRCd by +00316 +00317 std::vector<Module*> <a class="code" href="modules_8cpp.html#a8">modules</a>(255); +00318 std::vector<ircd_module*> <a class="code" href="modules_8cpp.html#a9">factory</a>(255); +00319 +<a name="l00320"></a><a class="code" href="modules_8cpp.html#a3">00320</a> <span class="keywordtype">int</span> <a class="code" href="modules_8cpp.html#a3">MODCOUNT</a> = -1; +00321 +00322 +</pre></div><hr><address style="align: right;"><small>Generated on Sat Apr 3 16:36:02 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> |