summaryrefslogtreecommitdiff
path: root/docs/module-doc/classServer.html
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-06 10:43:34 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-06 10:43:34 +0000
commit1d994c544474da53159257d9097997c0744a48a5 (patch)
tree1933ef85eb507645ed17f32ed5d69cd1fc2e3cb2 /docs/module-doc/classServer.html
parentd4bcf45eb3ef838d878971dbcd585510729fcff1 (diff)
Added support for SVS-style Server class methods for modules
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@400 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/module-doc/classServer.html')
-rw-r--r--docs/module-doc/classServer.html491
1 files changed, 372 insertions, 119 deletions
diff --git a/docs/module-doc/classServer.html b/docs/module-doc/classServer.html
index b6c3a546f..427f273cf 100644
--- a/docs/module-doc/classServer.html
+++ b/docs/module-doc/classServer.html
@@ -66,6 +66,16 @@ Inheritance diagram for Server:<p><center><img src="classServer__inherit__graph.
<tr><td>&nbsp;</td><td><font size=-1><em>Adds a command to the command table.</em> <a href="#a20"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a21">SendMode</a> (char **parameters, int pcnt, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sends a servermode.</em> <a href="#a21"></a><em></em></font><br><br></td></tr>
+<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a22">SendToModeMask</a> (std::string modes, int flags, std::string text)</td></tr>
+<tr><td>&nbsp;</td><td><font size=-1><em>Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter.</em> <a href="#a22"></a><em></em></font><br><br></td></tr>
+<tr><td nowrap align=right valign=top>virtual <a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a23">Server::JoinUserToChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string cname, std::string key)</td></tr>
+<tr><td>&nbsp;</td><td><font size=-1><em>Forces a user to join a channel.</em> <a href="#a23"></a><em></em></font><br><br></td></tr>
+<tr><td nowrap align=right valign=top>virtual <a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a24">Server::PartUserFromChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string cname, std::string reason)</td></tr>
+<tr><td>&nbsp;</td><td><font size=-1><em>Forces a user to part a channel.</em> <a href="#a24"></a><em></em></font><br><br></td></tr>
+<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a25">ChangeUserNick</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string nickname)</td></tr>
+<tr><td>&nbsp;</td><td><font size=-1><em>Forces a user nickchange.</em> <a href="#a25"></a><em></em></font><br><br></td></tr>
+<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a26">QuitUser</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string reason)</td></tr>
+<tr><td>&nbsp;</td><td><font size=-1><em>Forces a user to quit with the specified reason.</em> <a href="#a26"></a><em></em></font><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Allows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers.
@@ -74,7 +84,7 @@ All modules should instantiate at least one copy of this class, and use its memb
<p>
<p>
-Definition at line <a class="el" href="modules_8h-source.html#l00197">197</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
+Definition at line <a class="el" href="modules_8h-source.html#l00219">219</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="Server::Server"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
@@ -104,10 +114,10 @@ Default constructor.
<p>
Creates a Server object.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00125">125</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00128">128</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00126 {
-00127 }
+<div class="fragment"><pre>00129 {
+00130 }
</pre></div> </td>
</tr>
</table>
@@ -140,10 +150,10 @@ Default destructor.
<p>
Destroys a Server object.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00129">129</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00132">132</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00130 {
-00131 }
+<div class="fragment"><pre>00133 {
+00134 }
</pre></div> </td>
</tr>
</table>
@@ -201,13 +211,13 @@ This allows modules to add extra commands into the command table. You must place
typedef void (handlerfunc) (char**, int, userrec*); ... void handle_kill(char **parameters, int pcnt, userrec *user)<p>
When the command is typed, the parameters will be placed into the parameters array (similar to argv) and the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters than the 'minparams' value you specified when creating the command. The *user parameter is the class of the user which caused the command to trigger, who will always have the flag you specified in 'flags' when creating the initial command. For example to create an oper only command create the commands with flags='o'.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00143">143</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00172">172</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
References <a class="el" href="modules_8h.html#a13">createcommand()</a>.
<p>
-<div class="fragment"><pre>00144 {
-00145 <a class="code" href="modules_8h.html#a13">createcommand</a>(cmd,f,flags,minparams);
-00146 }
+<div class="fragment"><pre>00173 {
+00174 <a class="code" href="modules_8h.html#a13">createcommand</a>(cmd,f,flags,minparams);
+00175 }
</pre></div> </td>
</tr>
</table>
@@ -268,28 +278,75 @@ Adds an extended mode letter which is parsed by a module This allows modules to
<p>
+x for hostcloak. the "type" parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00244">244</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00273">273</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
References <a class="el" href="modules_8cpp-source.html#l00089">DoAddExtendedMode()</a>, <a class="el" href="modules_8h-source.html#l00018">MT_CLIENT</a>, and <a class="el" href="modules_8h-source.html#l00019">MT_SERVER</a>.
<p>
-<div class="fragment"><pre>00245 {
-00246 <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#a7">MT_SERVER</a>)
-00247 {
-00248 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>);
-00249 <span class="keywordflow">return</span> <span class="keyword">false</span>;
-00250 }
-00251 <span class="keywordflow">if</span> (((params_when_on&gt;0) || (params_when_off&gt;0)) &amp;&amp; (type == <a class="code" href="modules_8h.html#a6">MT_CLIENT</a>))
-00252 {
-00253 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>);
-00254 <span class="keywordflow">return</span> <span class="keyword">false</span>;
-00255 }
-00256 <span class="keywordflow">if</span> ((params_when_on&gt;1) || (params_when_off&gt;1))
-00257 {
-00258 log(DEBUG,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>);
-00259 <span class="keywordflow">return</span> <span class="keyword">false</span>;
-00260 }
-00261 <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);
-00262 }
+<div class="fragment"><pre>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&gt;0) || (params_when_off&gt;0)) &amp;&amp; (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&gt;1) || (params_when_off&gt;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 }
+</pre></div> </td>
+ </tr>
+</table>
+<a name="a25" doxytag="Server::ChangeUserNick"></a><p>
+<table width="100%" cellpadding="2" cellspacing="0" border="0">
+ <tr>
+ <td class="md">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void Server::ChangeUserNick </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>std::string&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>nickname</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Forces a user nickchange.
+<p>
+This command works similarly to SVSNICK, and can be used to implement Q-lines etc. If you specify an invalid nickname, the nick change will be dropped and the target user will receive the error numeric for it.
+<p>
+Definition at line <a class="el" href="modules_8cpp-source.html#l00156">156</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+<div class="fragment"><pre>00157 {
+00158 force_nickchange(user,nickname.c_str());
+00159 }
</pre></div> </td>
</tr>
</table>
@@ -332,11 +389,11 @@ Attempts to look up a user's privilages on a channel.
<p>
This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00222">222</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00251">251</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00223 {
-00224 <span class="keywordflow">return</span> cmode(User,Chan);
-00225 }
+<div class="fragment"><pre>00252 {
+00253 <span class="keywordflow">return</span> cmode(User,Chan);
+00254 }
</pre></div> </td>
</tr>
</table>
@@ -379,11 +436,11 @@ Returns true if two users share a common channel.
<p>
This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#a10">Server::SendCommon</a> method.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00185">185</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00214">214</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00186 {
-00187 <span class="keywordflow">return</span> (common_channels(u1,u2) != 0);
-00188 }
+<div class="fragment"><pre>00215 {
+00216 <span class="keywordflow">return</span> (common_channels(u1,u2) != 0);
+00217 }
</pre></div> </td>
</tr>
</table>
@@ -417,11 +474,11 @@ Attempts to look up a channel and return a pointer to it.
<p>
This function will return NULL if the channel does not exist.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00217">217</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00246">246</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00218 {
-00219 <span class="keywordflow">return</span> FindChan(channel.c_str());
-00220 }
+<div class="fragment"><pre>00247 {
+00248 <span class="keywordflow">return</span> FindChan(channel.c_str());
+00249 }
</pre></div> </td>
</tr>
</table>
@@ -455,11 +512,11 @@ Attempts to look up a nick and return a pointer to it.
<p>
This function will return NULL if the nick does not exist.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00212">212</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00241">241</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00213 {
-00214 <span class="keywordflow">return</span> Find(nick);
-00215 }
+<div class="fragment"><pre>00242 {
+00243 <span class="keywordflow">return</span> Find(nick);
+00244 }
</pre></div> </td>
</tr>
</table>
@@ -492,11 +549,11 @@ Returns the information of the server as returned by the /ADMIN command.
<p>
See the <a class="el" href="classAdmin.html">Admin</a> class for further information of the return value. The members <a class="el" href="classAdmin.html#m2">Admin::Nick</a>, <a class="el" href="classAdmin.html#m1">Admin::Email</a> and <a class="el" href="classAdmin.html#m0">Admin::Name</a> contain the information for the server where the module is loaded.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00237">237</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00266">266</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00238 {
-00239 <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
-00240 }
+<div class="fragment"><pre>00267 {
+00268 <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
+00269 }
</pre></div> </td>
</tr>
</table>
@@ -529,11 +586,11 @@ Returns the network name, global to all linked servers.
<p>
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00232">232</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00261">261</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00233 {
-00234 <span class="keywordflow">return</span> getnetworkname();
-00235 }
+<div class="fragment"><pre>00262 {
+00263 <span class="keywordflow">return</span> getnetworkname();
+00264 }
</pre></div> </td>
</tr>
</table>
@@ -566,11 +623,11 @@ Returns the server name of the server where the module is loaded.
<p>
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00227">227</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00256">256</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00228 {
-00229 <span class="keywordflow">return</span> getservername();
-00230 }
+<div class="fragment"><pre>00257 {
+00258 <span class="keywordflow">return</span> getservername();
+00259 }
</pre></div> </td>
</tr>
</table>
@@ -604,11 +661,11 @@ Returns true if a nick is valid.
<p>
Nicks for unregistered connections will return false.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00207">207</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00236">236</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00208 {
-00209 <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0);
-00210 }
+<div class="fragment"><pre>00237 {
+00238 <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0);
+00239 }
</pre></div> </td>
</tr>
</table>
@@ -651,11 +708,60 @@ Writes a log string.
<p>
This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00138">138</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00167">167</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+<div class="fragment"><pre>00168 {
+00169 log(level,<span class="stringliteral">"%s"</span>,s.c_str());
+00170 }
+</pre></div> </td>
+ </tr>
+</table>
+<a name="a26" doxytag="Server::QuitUser"></a><p>
+<table width="100%" cellpadding="2" cellspacing="0" border="0">
+ <tr>
+ <td class="md">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void Server::QuitUser </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>std::string&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>reason</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Forces a user to quit with the specified reason.
+<p>
+To the user, it will appear as if they typed /QUIT themselves, except for the fact that this function may bypass the quit prefix specified in the config file.<p>
+WARNING!<p>
+Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler.
+<p>
+Definition at line <a class="el" href="modules_8cpp-source.html#l00161">161</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00139 {
-00140 log(level,<span class="stringliteral">"%s"</span>,s.c_str());
-00141 }
+<div class="fragment"><pre>00162 {
+00163 kill_link(user,reason.c_str());
+00164 }
</pre></div> </td>
</tr>
</table>
@@ -698,11 +804,11 @@ Sends a line of text down a TCP/IP socket.
<p>
This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00153">153</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00182">182</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00154 {
-00155 Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
-00156 }
+<div class="fragment"><pre>00183 {
+00184 Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
+00185 }
</pre></div> </td>
</tr>
</table>
@@ -757,18 +863,18 @@ Sends text from a user to a channel (mulicast).
<p>
This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459).
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00173">173</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
-<p>
-<div class="fragment"><pre>00174 {
-00175 <span class="keywordflow">if</span> (IncludeSender)
-00176 {
-00177 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
-00178 }
-00179 <span class="keywordflow">else</span>
-00180 {
-00181 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
-00182 }
-00183 }
+Definition at line <a class="el" href="modules_8cpp-source.html#l00202">202</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+<div class="fragment"><pre>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 }
</pre></div> </td>
</tr>
</table>
@@ -817,18 +923,18 @@ Sends text from a user to one or more channels (mulicast).
<p>
This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00190">190</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
-<p>
-<div class="fragment"><pre>00191 {
-00192 <span class="keywordflow">if</span> (IncludeSender)
-00193 {
-00194 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
-00195 }
-00196 <span class="keywordflow">else</span>
-00197 {
-00198 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
-00199 }
-00200 }
+Definition at line <a class="el" href="modules_8cpp-source.html#l00219">219</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+<div class="fragment"><pre>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 }
</pre></div> </td>
</tr>
</table>
@@ -877,11 +983,11 @@ Sends text from a user to a socket.
<p>
This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00163">163</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00192">192</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00164 {
-00165 WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
-00166 }
+<div class="fragment"><pre>00193 {
+00194 WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
+00195 }
</pre></div> </td>
</tr>
</table>
@@ -937,13 +1043,13 @@ modes[2] = user-&gt;nick;<p>
Srv-&gt;SendMode(modes,3,user);<p>
The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00148">148</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00177">177</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
References <a class="el" href="modules_8h.html#a14">server_mode()</a>.
<p>
-<div class="fragment"><pre>00149 {
-00150 <a class="code" href="modules_8h.html#a14">server_mode</a>(parameters,pcnt,user);
-00151 }
+<div class="fragment"><pre>00178 {
+00179 <a class="code" href="modules_8h.html#a14">server_mode</a>(parameters,pcnt,user);
+00180 }
</pre></div> </td>
</tr>
</table>
@@ -977,11 +1083,11 @@ Sends text to all opers.
<p>
This method sends a server notice to all opers with the usermode +s.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00133">133</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00136">136</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00134 {
-00135 WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
-00136 }
+<div class="fragment"><pre>00137 {
+00138 WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
+00139 }
</pre></div> </td>
</tr>
</table>
@@ -1024,11 +1130,11 @@ Sends text from the server to a socket.
<p>
This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00158">158</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00187">187</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00159 {
-00160 WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
-00161 }
+<div class="fragment"><pre>00188 {
+00189 WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
+00190 }
</pre></div> </td>
</tr>
</table>
@@ -1077,11 +1183,66 @@ Sends text from a user to another user.
<p>
This method writes a line of text to a user, with a user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459)
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00168">168</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00197">197</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00169 {
-00170 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
-00171 }
+<div class="fragment"><pre>00198 {
+00199 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
+00200 }
+</pre></div> </td>
+ </tr>
+</table>
+<a name="a22" doxytag="Server::SendToModeMask"></a><p>
+<table width="100%" cellpadding="2" cellspacing="0" border="0">
+ <tr>
+ <td class="md">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void Server::SendToModeMask </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">std::string&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>modes</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>std::string&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>text</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter.
+<p>
+These can be RFC specified modes such as +i, or module provided modes, including ones provided by your own module. In the second parameter you must place a flag value which indicates wether the modes you have given will be logically ANDed or OR'ed. You may use one of either WM_AND or WM_OR. for example, if you were to use:<p>
+Serv-&gt;SendToModeMask("xi", WM_OR, "m00");<p>
+Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message.
+<p>
+Definition at line <a class="el" href="modules_8cpp-source.html#l00141">141</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+<div class="fragment"><pre>00142 {
+00143 WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str());
+00144 }
</pre></div> </td>
</tr>
</table>
@@ -1124,17 +1285,109 @@ Sends a WALLOPS message.
<p>
This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
<p>
-Definition at line <a class="el" href="modules_8cpp-source.html#l00202">202</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+Definition at line <a class="el" href="modules_8cpp-source.html#l00231">231</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
<p>
-<div class="fragment"><pre>00203 {
-00204 WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str());
-00205 }
+<div class="fragment"><pre>00232 {
+00233 WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str());
+00234 }
</pre></div> </td>
</tr>
</table>
+<a name="a23" doxytag="Server::Server::JoinUserToChannel"></a><p>
+<table width="100%" cellpadding="2" cellspacing="0" border="0">
+ <tr>
+ <td class="md">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> virtual <a class="el" href="classchanrec.html">chanrec</a>* Server::Server::JoinUserToChannel </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>std::string&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>cname</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>std::string&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>key</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Forces a user to join a channel.
+<p>
+This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL. </td>
+ </tr>
+</table>
+<a name="a24" doxytag="Server::Server::PartUserFromChannel"></a><p>
+<table width="100%" cellpadding="2" cellspacing="0" border="0">
+ <tr>
+ <td class="md">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> virtual <a class="el" href="classchanrec.html">chanrec</a>* Server::Server::PartUserFromChannel </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>std::string&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>cname</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>std::string&nbsp;</td>
+ <td class="mdname" nowrap>&nbsp; <em>reason</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Forces a user to part a channel.
+<p>
+This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version. </td>
+ </tr>
+</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="modules_8h-source.html">modules.h</a><li><a class="el" href="modules_8cpp-source.html">modules.cpp</a></ul>
-<hr><address style="align: right;"><small>Generated on Mon Apr 5 02:04:09 2004 for InspIRCd by
+<hr><address style="align: right;"><small>Generated on Tue Apr 6 11:42:46 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>