]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classServer.html
Updated docs
[user/henk/code/inspircd.git] / docs / module-doc / classServer.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>Server class Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3-rc3 -->
7 <center>
8 <a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
9 <hr><h1>Server Class Reference</h1>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. 
10 <a href="#_details">More...</a>
11 <p>
12 <code>#include &lt;<a class="el" href="modules_8h-source.html">modules.h</a>&gt;</code>
13 <p>
14 Inheritance diagram for Server:<p><center><img src="classServer__inherit__graph.gif" border="0" usemap="#Server__inherit__map" alt="Inheritance graph"></center>
15 <map name="Server__inherit__map">
16 <area href="classclassbase.html" shape="rect" coords="7,16,73,37" alt="">
17 </map>
18 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for Server:<p><center><img src="classServer__coll__graph.gif" border="0" usemap="#Server__coll__map" alt="Collaboration graph"></center>
19 <map name="Server__coll__map">
20 <area href="classclassbase.html" shape="rect" coords="7,106,73,128" alt="">
21 </map>
22 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classServer-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
23 <tr><td></td></tr>
24 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
25 <tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a0">Server</a> ()</td></tr>
26 <tr><td>&nbsp;</td><td><font size=-1><em>Default constructor.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
27 <tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a1">~Server</a> ()</td></tr>
28 <tr><td>&nbsp;</td><td><font size=-1><em>Default destructor.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
29 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a2">SendOpers</a> (std::string s)</td></tr>
30 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text to all opers.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
31 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a3">Log</a> (int level, std::string s)</td></tr>
32 <tr><td>&nbsp;</td><td><font size=-1><em>Writes a log string.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
33 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a4">Send</a> (int Socket, std::string s)</td></tr>
34 <tr><td>&nbsp;</td><td><font size=-1><em>Sends a line of text down a TCP/IP socket.</em> <a href="#a4"></a><em></em></font><br><br></td></tr>
35 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a5">SendServ</a> (int Socket, std::string s)</td></tr>
36 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text from the server to a socket.</em> <a href="#a5"></a><em></em></font><br><br></td></tr>
37 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a6">SendFrom</a> (int Socket, <a class="el" href="classuserrec.html">userrec</a> *User, std::string s)</td></tr>
38 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text from a user to a socket.</em> <a href="#a6"></a><em></em></font><br><br></td></tr>
39 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a7">SendTo</a> (<a class="el" href="classuserrec.html">userrec</a> *Source, <a class="el" href="classuserrec.html">userrec</a> *Dest, std::string s)</td></tr>
40 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text from a user to another user.</em> <a href="#a7"></a><em></em></font><br><br></td></tr>
41 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a8">SendChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Channel, std::string s, bool IncludeSender)</td></tr>
42 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text from a user to a channel (mulicast).</em> <a href="#a8"></a><em></em></font><br><br></td></tr>
43 <tr><td nowrap align=right valign=top>virtual bool&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a9">CommonChannels</a> (<a class="el" href="classuserrec.html">userrec</a> *u1, <a class="el" href="classuserrec.html">userrec</a> *u2)</td></tr>
44 <tr><td>&nbsp;</td><td><font size=-1><em>Returns true if two users share a common channel.</em> <a href="#a9"></a><em></em></font><br><br></td></tr>
45 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a10">SendCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *User, std::string text, bool IncludeSender)</td></tr>
46 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text from a user to one or more channels (mulicast).</em> <a href="#a10"></a><em></em></font><br><br></td></tr>
47 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a11">SendWallops</a> (<a class="el" href="classuserrec.html">userrec</a> *User, std::string text)</td></tr>
48 <tr><td>&nbsp;</td><td><font size=-1><em>Sends a WALLOPS message.</em> <a href="#a11"></a><em></em></font><br><br></td></tr>
49 <tr><td nowrap align=right valign=top>virtual bool&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a12">IsNick</a> (std::string nick)</td></tr>
50 <tr><td>&nbsp;</td><td><font size=-1><em>Returns true if a nick is valid.</em> <a href="#a12"></a><em></em></font><br><br></td></tr>
51 <tr><td nowrap align=right valign=top>virtual <a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a13">FindNick</a> (std::string nick)</td></tr>
52 <tr><td>&nbsp;</td><td><font size=-1><em>Attempts to look up a nick and return a pointer to it.</em> <a href="#a13"></a><em></em></font><br><br></td></tr>
53 <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#a14">FindChannel</a> (std::string channel)</td></tr>
54 <tr><td>&nbsp;</td><td><font size=-1><em>Attempts to look up a channel and return a pointer to it.</em> <a href="#a14"></a><em></em></font><br><br></td></tr>
55 <tr><td nowrap align=right valign=top>virtual std::string&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a15">ChanMode</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Chan)</td></tr>
56 <tr><td>&nbsp;</td><td><font size=-1><em>Attempts to look up a user's privilages on a channel.</em> <a href="#a15"></a><em></em></font><br><br></td></tr>
57 <tr><td nowrap align=right valign=top>virtual std::string&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a16">GetServerName</a> ()</td></tr>
58 <tr><td>&nbsp;</td><td><font size=-1><em>Returns the server name of the server where the module is loaded.</em> <a href="#a16"></a><em></em></font><br><br></td></tr>
59 <tr><td nowrap align=right valign=top>virtual std::string&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a17">GetNetworkName</a> ()</td></tr>
60 <tr><td>&nbsp;</td><td><font size=-1><em>Returns the network name, global to all linked servers.</em> <a href="#a17"></a><em></em></font><br><br></td></tr>
61 <tr><td nowrap align=right valign=top>virtual <a class="el" href="classAdmin.html">Admin</a>&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a18">GetAdmin</a> ()</td></tr>
62 <tr><td>&nbsp;</td><td><font size=-1><em>Returns the information of the server as returned by the /ADMIN command.</em> <a href="#a18"></a><em></em></font><br><br></td></tr>
63 <tr><td nowrap align=right valign=top>virtual bool&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a19">AddExtendedMode</a> (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)</td></tr>
64 <tr><td>&nbsp;</td><td><font size=-1><em>Adds an extended mode letter which is parsed by a module This allows modules to add extra mode letters, e.g.</em> <a href="#a19"></a><em></em></font><br><br></td></tr>
65 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a20">AddCommand</a> (char *cmd, <a class="el" href="ctables_8h.html#a0">handlerfunc</a> f, char flags, int minparams)</td></tr>
66 <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>
67 <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>
68 <tr><td>&nbsp;</td><td><font size=-1><em>Sends a servermode.</em> <a href="#a21"></a><em></em></font><br><br></td></tr>
69 <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>
70 <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>
71 <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>
72 <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>
73 <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>
74 <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>
75 <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>
76 <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>
77 <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>
78 <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>
79 </table>
80 <hr><a name="_details"></a><h2>Detailed Description</h2>
81 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.
82 <p>
83 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. 
84 <p>
85
86 <p>
87 Definition at line <a class="el" href="modules_8h-source.html#l00239">239</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
88 <a name="a0" doxytag="Server::Server"></a><p>
89 <table width="100%" cellpadding="2" cellspacing="0" border="0">
90   <tr>
91     <td class="md">
92       <table cellpadding="0" cellspacing="0" border="0">
93         <tr>
94           <td class="md" nowrap valign="top"> Server::Server </td>
95           <td class="md" valign="top">(&nbsp;</td>
96           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
97           <td class="md" valign="top">)&nbsp;</td>
98           <td class="md" nowrap></td>
99         </tr>
100
101       </table>
102     </td>
103   </tr>
104 </table>
105 <table cellspacing=5 cellpadding=0 border=0>
106   <tr>
107     <td>
108       &nbsp;
109     </td>
110     <td>
111
112 <p>
113 Default constructor.
114 <p>
115 Creates a Server object.
116 <p>
117 Definition at line <a class="el" href="modules_8cpp-source.html#l00130">130</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
118 <p>
119 <div class="fragment"><pre>00131 {
120 00132 }
121 </pre></div>    </td>
122   </tr>
123 </table>
124 <a name="a1" doxytag="Server::~Server"></a><p>
125 <table width="100%" cellpadding="2" cellspacing="0" border="0">
126   <tr>
127     <td class="md">
128       <table cellpadding="0" cellspacing="0" border="0">
129         <tr>
130           <td class="md" nowrap valign="top"> Server::~Server </td>
131           <td class="md" valign="top">(&nbsp;</td>
132           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
133           <td class="md" valign="top">)&nbsp;</td>
134           <td class="md" nowrap><code> [virtual]</code></td>
135         </tr>
136
137       </table>
138     </td>
139   </tr>
140 </table>
141 <table cellspacing=5 cellpadding=0 border=0>
142   <tr>
143     <td>
144       &nbsp;
145     </td>
146     <td>
147
148 <p>
149 Default destructor.
150 <p>
151 Destroys a Server object.
152 <p>
153 Definition at line <a class="el" href="modules_8cpp-source.html#l00134">134</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
154 <p>
155 <div class="fragment"><pre>00135 {
156 00136 }
157 </pre></div>    </td>
158   </tr>
159 </table>
160 <hr><h2>Member Function Documentation</h2>
161 <a name="a20" doxytag="Server::AddCommand"></a><p>
162 <table width="100%" cellpadding="2" cellspacing="0" border="0">
163   <tr>
164     <td class="md">
165       <table cellpadding="0" cellspacing="0" border="0">
166         <tr>
167           <td class="md" nowrap valign="top"> void Server::AddCommand </td>
168           <td class="md" valign="top">(&nbsp;</td>
169           <td class="md" nowrap valign="top">char *&nbsp;</td>
170           <td class="mdname" nowrap>&nbsp; <em>cmd</em>, </td>
171         </tr>
172         <tr>
173           <td></td>
174           <td></td>
175           <td class="md" nowrap><a class="el" href="ctables_8h.html#a0">handlerfunc</a>&nbsp;</td>
176           <td class="mdname" nowrap>&nbsp; <em>f</em>, </td>
177         </tr>
178         <tr>
179           <td></td>
180           <td></td>
181           <td class="md" nowrap>char&nbsp;</td>
182           <td class="mdname" nowrap>&nbsp; <em>flags</em>, </td>
183         </tr>
184         <tr>
185           <td></td>
186           <td></td>
187           <td class="md" nowrap>int&nbsp;</td>
188           <td class="mdname" nowrap>&nbsp; <em>minparams</em></td>
189         </tr>
190         <tr>
191           <td></td>
192           <td class="md">)&nbsp;</td>
193           <td class="md" colspan="2"><code> [virtual]</code></td>
194         </tr>
195
196       </table>
197     </td>
198   </tr>
199 </table>
200 <table cellspacing=5 cellpadding=0 border=0>
201   <tr>
202     <td>
203       &nbsp;
204     </td>
205     <td>
206
207 <p>
208 Adds a command to the command table.
209 <p>
210 This allows modules to add extra commands into the command table. You must place a function within your module which is is of type handlerfunc:<p>
211 typedef void (handlerfunc) (char**, int, userrec*); ... void handle_kill(char **parameters, int pcnt, userrec *user)<p>
212 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'.
213 <p>
214 Definition at line <a class="el" href="modules_8cpp-source.html#l00174">174</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
215 <p>
216 References <a class="el" href="modules_8h.html#a13">createcommand()</a>.
217 <p>
218 <div class="fragment"><pre>00175 {
219 00176         <a class="code" href="modules_8h.html#a13">createcommand</a>(cmd,f,flags,minparams);
220 00177 }
221 </pre></div>    </td>
222   </tr>
223 </table>
224 <a name="a19" doxytag="Server::AddExtendedMode"></a><p>
225 <table width="100%" cellpadding="2" cellspacing="0" border="0">
226   <tr>
227     <td class="md">
228       <table cellpadding="0" cellspacing="0" border="0">
229         <tr>
230           <td class="md" nowrap valign="top"> bool Server::AddExtendedMode </td>
231           <td class="md" valign="top">(&nbsp;</td>
232           <td class="md" nowrap valign="top">char&nbsp;</td>
233           <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
234         </tr>
235         <tr>
236           <td></td>
237           <td></td>
238           <td class="md" nowrap>int&nbsp;</td>
239           <td class="mdname" nowrap>&nbsp; <em>type</em>, </td>
240         </tr>
241         <tr>
242           <td></td>
243           <td></td>
244           <td class="md" nowrap>bool&nbsp;</td>
245           <td class="mdname" nowrap>&nbsp; <em>requires_oper</em>, </td>
246         </tr>
247         <tr>
248           <td></td>
249           <td></td>
250           <td class="md" nowrap>int&nbsp;</td>
251           <td class="mdname" nowrap>&nbsp; <em>params_when_on</em>, </td>
252         </tr>
253         <tr>
254           <td></td>
255           <td></td>
256           <td class="md" nowrap>int&nbsp;</td>
257           <td class="mdname" nowrap>&nbsp; <em>params_when_off</em></td>
258         </tr>
259         <tr>
260           <td></td>
261           <td class="md">)&nbsp;</td>
262           <td class="md" colspan="2"><code> [virtual]</code></td>
263         </tr>
264
265       </table>
266     </td>
267   </tr>
268 </table>
269 <table cellspacing=5 cellpadding=0 border=0>
270   <tr>
271     <td>
272       &nbsp;
273     </td>
274     <td>
275
276 <p>
277 Adds an extended mode letter which is parsed by a module This allows modules to add extra mode letters, e.g.
278 <p>
279 +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.
280 <p>
281 Definition at line <a class="el" href="modules_8cpp-source.html#l00275">275</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
282 <p>
283 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>.
284 <p>
285 <div class="fragment"><pre>00276 {
286 00277         <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#a7">MT_SERVER</a>)
287 00278         {
288 00279                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>);
289 00280                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
290 00281         }
291 00282         <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>))
292 00283         {
293 00284                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>);
294 00285                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
295 00286         }
296 00287         <span class="keywordflow">if</span> ((params_when_on&gt;1) || (params_when_off&gt;1))
297 00288         {
298 00289                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>);
299 00290                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
300 00291         }
301 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);
302 00293 }
303 </pre></div>    </td>
304   </tr>
305 </table>
306 <a name="a25" doxytag="Server::ChangeUserNick"></a><p>
307 <table width="100%" cellpadding="2" cellspacing="0" border="0">
308   <tr>
309     <td class="md">
310       <table cellpadding="0" cellspacing="0" border="0">
311         <tr>
312           <td class="md" nowrap valign="top"> void Server::ChangeUserNick </td>
313           <td class="md" valign="top">(&nbsp;</td>
314           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
315           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
316         </tr>
317         <tr>
318           <td></td>
319           <td></td>
320           <td class="md" nowrap>std::string&nbsp;</td>
321           <td class="mdname" nowrap>&nbsp; <em>nickname</em></td>
322         </tr>
323         <tr>
324           <td></td>
325           <td class="md">)&nbsp;</td>
326           <td class="md" colspan="2"><code> [virtual]</code></td>
327         </tr>
328
329       </table>
330     </td>
331   </tr>
332 </table>
333 <table cellspacing=5 cellpadding=0 border=0>
334   <tr>
335     <td>
336       &nbsp;
337     </td>
338     <td>
339
340 <p>
341 Forces a user nickchange.
342 <p>
343 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.
344 <p>
345 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>.
346 <p>
347 <div class="fragment"><pre>00159 {
348 00160         force_nickchange(user,nickname.c_str());
349 00161 }
350 </pre></div>    </td>
351   </tr>
352 </table>
353 <a name="a15" doxytag="Server::ChanMode"></a><p>
354 <table width="100%" cellpadding="2" cellspacing="0" border="0">
355   <tr>
356     <td class="md">
357       <table cellpadding="0" cellspacing="0" border="0">
358         <tr>
359           <td class="md" nowrap valign="top"> std::string Server::ChanMode </td>
360           <td class="md" valign="top">(&nbsp;</td>
361           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
362           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
363         </tr>
364         <tr>
365           <td></td>
366           <td></td>
367           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
368           <td class="mdname" nowrap>&nbsp; <em>Chan</em></td>
369         </tr>
370         <tr>
371           <td></td>
372           <td class="md">)&nbsp;</td>
373           <td class="md" colspan="2"><code> [virtual]</code></td>
374         </tr>
375
376       </table>
377     </td>
378   </tr>
379 </table>
380 <table cellspacing=5 cellpadding=0 border=0>
381   <tr>
382     <td>
383       &nbsp;
384     </td>
385     <td>
386
387 <p>
388 Attempts to look up a user's privilages on a channel.
389 <p>
390 This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.
391 <p>
392 Definition at line <a class="el" href="modules_8cpp-source.html#l00253">253</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
393 <p>
394 <div class="fragment"><pre>00254 {
395 00255         <span class="keywordflow">return</span> cmode(User,Chan);
396 00256 }
397 </pre></div>    </td>
398   </tr>
399 </table>
400 <a name="a9" doxytag="Server::CommonChannels"></a><p>
401 <table width="100%" cellpadding="2" cellspacing="0" border="0">
402   <tr>
403     <td class="md">
404       <table cellpadding="0" cellspacing="0" border="0">
405         <tr>
406           <td class="md" nowrap valign="top"> bool Server::CommonChannels </td>
407           <td class="md" valign="top">(&nbsp;</td>
408           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
409           <td class="mdname" nowrap>&nbsp; <em>u1</em>, </td>
410         </tr>
411         <tr>
412           <td></td>
413           <td></td>
414           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
415           <td class="mdname" nowrap>&nbsp; <em>u2</em></td>
416         </tr>
417         <tr>
418           <td></td>
419           <td class="md">)&nbsp;</td>
420           <td class="md" colspan="2"><code> [virtual]</code></td>
421         </tr>
422
423       </table>
424     </td>
425   </tr>
426 </table>
427 <table cellspacing=5 cellpadding=0 border=0>
428   <tr>
429     <td>
430       &nbsp;
431     </td>
432     <td>
433
434 <p>
435 Returns true if two users share a common channel.
436 <p>
437 This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#a10">Server::SendCommon</a> method.
438 <p>
439 Definition at line <a class="el" href="modules_8cpp-source.html#l00216">216</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
440 <p>
441 <div class="fragment"><pre>00217 {
442 00218         <span class="keywordflow">return</span> (common_channels(u1,u2) != 0);
443 00219 }
444 </pre></div>    </td>
445   </tr>
446 </table>
447 <a name="a14" doxytag="Server::FindChannel"></a><p>
448 <table width="100%" cellpadding="2" cellspacing="0" border="0">
449   <tr>
450     <td class="md">
451       <table cellpadding="0" cellspacing="0" border="0">
452         <tr>
453           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
454           <td class="md" valign="top">(&nbsp;</td>
455           <td class="md" nowrap valign="top">std::string&nbsp;</td>
456           <td class="mdname1" valign="top" nowrap>&nbsp; <em>channel</em>          </td>
457           <td class="md" valign="top">)&nbsp;</td>
458           <td class="md" nowrap><code> [virtual]</code></td>
459         </tr>
460
461       </table>
462     </td>
463   </tr>
464 </table>
465 <table cellspacing=5 cellpadding=0 border=0>
466   <tr>
467     <td>
468       &nbsp;
469     </td>
470     <td>
471
472 <p>
473 Attempts to look up a channel and return a pointer to it.
474 <p>
475 This function will return NULL if the channel does not exist.
476 <p>
477 Definition at line <a class="el" href="modules_8cpp-source.html#l00248">248</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
478 <p>
479 <div class="fragment"><pre>00249 {
480 00250         <span class="keywordflow">return</span> FindChan(channel.c_str());
481 00251 }
482 </pre></div>    </td>
483   </tr>
484 </table>
485 <a name="a13" doxytag="Server::FindNick"></a><p>
486 <table width="100%" cellpadding="2" cellspacing="0" border="0">
487   <tr>
488     <td class="md">
489       <table cellpadding="0" cellspacing="0" border="0">
490         <tr>
491           <td class="md" nowrap valign="top"> <a class="el" href="classuserrec.html">userrec</a> * Server::FindNick </td>
492           <td class="md" valign="top">(&nbsp;</td>
493           <td class="md" nowrap valign="top">std::string&nbsp;</td>
494           <td class="mdname1" valign="top" nowrap>&nbsp; <em>nick</em>          </td>
495           <td class="md" valign="top">)&nbsp;</td>
496           <td class="md" nowrap><code> [virtual]</code></td>
497         </tr>
498
499       </table>
500     </td>
501   </tr>
502 </table>
503 <table cellspacing=5 cellpadding=0 border=0>
504   <tr>
505     <td>
506       &nbsp;
507     </td>
508     <td>
509
510 <p>
511 Attempts to look up a nick and return a pointer to it.
512 <p>
513 This function will return NULL if the nick does not exist.
514 <p>
515 Definition at line <a class="el" href="modules_8cpp-source.html#l00243">243</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
516 <p>
517 <div class="fragment"><pre>00244 {
518 00245         <span class="keywordflow">return</span> Find(nick);
519 00246 }
520 </pre></div>    </td>
521   </tr>
522 </table>
523 <a name="a18" doxytag="Server::GetAdmin"></a><p>
524 <table width="100%" cellpadding="2" cellspacing="0" border="0">
525   <tr>
526     <td class="md">
527       <table cellpadding="0" cellspacing="0" border="0">
528         <tr>
529           <td class="md" nowrap valign="top"> <a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
530           <td class="md" valign="top">(&nbsp;</td>
531           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
532           <td class="md" valign="top">)&nbsp;</td>
533           <td class="md" nowrap><code> [virtual]</code></td>
534         </tr>
535
536       </table>
537     </td>
538   </tr>
539 </table>
540 <table cellspacing=5 cellpadding=0 border=0>
541   <tr>
542     <td>
543       &nbsp;
544     </td>
545     <td>
546
547 <p>
548 Returns the information of the server as returned by the /ADMIN command.
549 <p>
550 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.
551 <p>
552 Definition at line <a class="el" href="modules_8cpp-source.html#l00268">268</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
553 <p>
554 <div class="fragment"><pre>00269 {
555 00270         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
556 00271 }
557 </pre></div>    </td>
558   </tr>
559 </table>
560 <a name="a17" doxytag="Server::GetNetworkName"></a><p>
561 <table width="100%" cellpadding="2" cellspacing="0" border="0">
562   <tr>
563     <td class="md">
564       <table cellpadding="0" cellspacing="0" border="0">
565         <tr>
566           <td class="md" nowrap valign="top"> std::string Server::GetNetworkName </td>
567           <td class="md" valign="top">(&nbsp;</td>
568           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
569           <td class="md" valign="top">)&nbsp;</td>
570           <td class="md" nowrap><code> [virtual]</code></td>
571         </tr>
572
573       </table>
574     </td>
575   </tr>
576 </table>
577 <table cellspacing=5 cellpadding=0 border=0>
578   <tr>
579     <td>
580       &nbsp;
581     </td>
582     <td>
583
584 <p>
585 Returns the network name, global to all linked servers.
586 <p>
587
588 <p>
589 Definition at line <a class="el" href="modules_8cpp-source.html#l00263">263</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
590 <p>
591 <div class="fragment"><pre>00264 {
592 00265         <span class="keywordflow">return</span> getnetworkname();
593 00266 }
594 </pre></div>    </td>
595   </tr>
596 </table>
597 <a name="a16" doxytag="Server::GetServerName"></a><p>
598 <table width="100%" cellpadding="2" cellspacing="0" border="0">
599   <tr>
600     <td class="md">
601       <table cellpadding="0" cellspacing="0" border="0">
602         <tr>
603           <td class="md" nowrap valign="top"> std::string Server::GetServerName </td>
604           <td class="md" valign="top">(&nbsp;</td>
605           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
606           <td class="md" valign="top">)&nbsp;</td>
607           <td class="md" nowrap><code> [virtual]</code></td>
608         </tr>
609
610       </table>
611     </td>
612   </tr>
613 </table>
614 <table cellspacing=5 cellpadding=0 border=0>
615   <tr>
616     <td>
617       &nbsp;
618     </td>
619     <td>
620
621 <p>
622 Returns the server name of the server where the module is loaded.
623 <p>
624
625 <p>
626 Definition at line <a class="el" href="modules_8cpp-source.html#l00258">258</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
627 <p>
628 <div class="fragment"><pre>00259 {
629 00260         <span class="keywordflow">return</span> getservername();
630 00261 }
631 </pre></div>    </td>
632   </tr>
633 </table>
634 <a name="a12" doxytag="Server::IsNick"></a><p>
635 <table width="100%" cellpadding="2" cellspacing="0" border="0">
636   <tr>
637     <td class="md">
638       <table cellpadding="0" cellspacing="0" border="0">
639         <tr>
640           <td class="md" nowrap valign="top"> bool Server::IsNick </td>
641           <td class="md" valign="top">(&nbsp;</td>
642           <td class="md" nowrap valign="top">std::string&nbsp;</td>
643           <td class="mdname1" valign="top" nowrap>&nbsp; <em>nick</em>          </td>
644           <td class="md" valign="top">)&nbsp;</td>
645           <td class="md" nowrap><code> [virtual]</code></td>
646         </tr>
647
648       </table>
649     </td>
650   </tr>
651 </table>
652 <table cellspacing=5 cellpadding=0 border=0>
653   <tr>
654     <td>
655       &nbsp;
656     </td>
657     <td>
658
659 <p>
660 Returns true if a nick is valid.
661 <p>
662 Nicks for unregistered connections will return false.
663 <p>
664 Definition at line <a class="el" href="modules_8cpp-source.html#l00238">238</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
665 <p>
666 <div class="fragment"><pre>00239 {
667 00240         <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0);
668 00241 }
669 </pre></div>    </td>
670   </tr>
671 </table>
672 <a name="a3" doxytag="Server::Log"></a><p>
673 <table width="100%" cellpadding="2" cellspacing="0" border="0">
674   <tr>
675     <td class="md">
676       <table cellpadding="0" cellspacing="0" border="0">
677         <tr>
678           <td class="md" nowrap valign="top"> void Server::Log </td>
679           <td class="md" valign="top">(&nbsp;</td>
680           <td class="md" nowrap valign="top">int&nbsp;</td>
681           <td class="mdname" nowrap>&nbsp; <em>level</em>, </td>
682         </tr>
683         <tr>
684           <td></td>
685           <td></td>
686           <td class="md" nowrap>std::string&nbsp;</td>
687           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
688         </tr>
689         <tr>
690           <td></td>
691           <td class="md">)&nbsp;</td>
692           <td class="md" colspan="2"><code> [virtual]</code></td>
693         </tr>
694
695       </table>
696     </td>
697   </tr>
698 </table>
699 <table cellspacing=5 cellpadding=0 border=0>
700   <tr>
701     <td>
702       &nbsp;
703     </td>
704     <td>
705
706 <p>
707 Writes a log string.
708 <p>
709 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.
710 <p>
711 Definition at line <a class="el" href="modules_8cpp-source.html#l00169">169</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
712 <p>
713 <div class="fragment"><pre>00170 {
714 00171         log(level,<span class="stringliteral">"%s"</span>,s.c_str());
715 00172 }
716 </pre></div>    </td>
717   </tr>
718 </table>
719 <a name="a26" doxytag="Server::QuitUser"></a><p>
720 <table width="100%" cellpadding="2" cellspacing="0" border="0">
721   <tr>
722     <td class="md">
723       <table cellpadding="0" cellspacing="0" border="0">
724         <tr>
725           <td class="md" nowrap valign="top"> void Server::QuitUser </td>
726           <td class="md" valign="top">(&nbsp;</td>
727           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
728           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
729         </tr>
730         <tr>
731           <td></td>
732           <td></td>
733           <td class="md" nowrap>std::string&nbsp;</td>
734           <td class="mdname" nowrap>&nbsp; <em>reason</em></td>
735         </tr>
736         <tr>
737           <td></td>
738           <td class="md">)&nbsp;</td>
739           <td class="md" colspan="2"><code> [virtual]</code></td>
740         </tr>
741
742       </table>
743     </td>
744   </tr>
745 </table>
746 <table cellspacing=5 cellpadding=0 border=0>
747   <tr>
748     <td>
749       &nbsp;
750     </td>
751     <td>
752
753 <p>
754 Forces a user to quit with the specified reason.
755 <p>
756 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>
757 WARNING!<p>
758 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.
759 <p>
760 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>.
761 <p>
762 <div class="fragment"><pre>00164 {
763 00165         kill_link(user,reason.c_str());
764 00166 }
765 </pre></div>    </td>
766   </tr>
767 </table>
768 <a name="a4" doxytag="Server::Send"></a><p>
769 <table width="100%" cellpadding="2" cellspacing="0" border="0">
770   <tr>
771     <td class="md">
772       <table cellpadding="0" cellspacing="0" border="0">
773         <tr>
774           <td class="md" nowrap valign="top"> void Server::Send </td>
775           <td class="md" valign="top">(&nbsp;</td>
776           <td class="md" nowrap valign="top">int&nbsp;</td>
777           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
778         </tr>
779         <tr>
780           <td></td>
781           <td></td>
782           <td class="md" nowrap>std::string&nbsp;</td>
783           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
784         </tr>
785         <tr>
786           <td></td>
787           <td class="md">)&nbsp;</td>
788           <td class="md" colspan="2"><code> [virtual]</code></td>
789         </tr>
790
791       </table>
792     </td>
793   </tr>
794 </table>
795 <table cellspacing=5 cellpadding=0 border=0>
796   <tr>
797     <td>
798       &nbsp;
799     </td>
800     <td>
801
802 <p>
803 Sends a line of text down a TCP/IP socket.
804 <p>
805 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
806 <p>
807 Definition at line <a class="el" href="modules_8cpp-source.html#l00184">184</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
808 <p>
809 <div class="fragment"><pre>00185 {
810 00186         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
811 00187 }
812 </pre></div>    </td>
813   </tr>
814 </table>
815 <a name="a8" doxytag="Server::SendChannel"></a><p>
816 <table width="100%" cellpadding="2" cellspacing="0" border="0">
817   <tr>
818     <td class="md">
819       <table cellpadding="0" cellspacing="0" border="0">
820         <tr>
821           <td class="md" nowrap valign="top"> void Server::SendChannel </td>
822           <td class="md" valign="top">(&nbsp;</td>
823           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
824           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
825         </tr>
826         <tr>
827           <td></td>
828           <td></td>
829           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
830           <td class="mdname" nowrap>&nbsp; <em>Channel</em>, </td>
831         </tr>
832         <tr>
833           <td></td>
834           <td></td>
835           <td class="md" nowrap>std::string&nbsp;</td>
836           <td class="mdname" nowrap>&nbsp; <em>s</em>, </td>
837         </tr>
838         <tr>
839           <td></td>
840           <td></td>
841           <td class="md" nowrap>bool&nbsp;</td>
842           <td class="mdname" nowrap>&nbsp; <em>IncludeSender</em></td>
843         </tr>
844         <tr>
845           <td></td>
846           <td class="md">)&nbsp;</td>
847           <td class="md" colspan="2"><code> [virtual]</code></td>
848         </tr>
849
850       </table>
851     </td>
852   </tr>
853 </table>
854 <table cellspacing=5 cellpadding=0 border=0>
855   <tr>
856     <td>
857       &nbsp;
858     </td>
859     <td>
860
861 <p>
862 Sends text from a user to a channel (mulicast).
863 <p>
864 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).
865 <p>
866 Definition at line <a class="el" href="modules_8cpp-source.html#l00204">204</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
867 <p>
868 <div class="fragment"><pre>00205 {
869 00206         <span class="keywordflow">if</span> (IncludeSender)
870 00207         {
871 00208                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
872 00209         }
873 00210         <span class="keywordflow">else</span>
874 00211         {
875 00212                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
876 00213         }
877 00214 }
878 </pre></div>    </td>
879   </tr>
880 </table>
881 <a name="a10" doxytag="Server::SendCommon"></a><p>
882 <table width="100%" cellpadding="2" cellspacing="0" border="0">
883   <tr>
884     <td class="md">
885       <table cellpadding="0" cellspacing="0" border="0">
886         <tr>
887           <td class="md" nowrap valign="top"> void Server::SendCommon </td>
888           <td class="md" valign="top">(&nbsp;</td>
889           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
890           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
891         </tr>
892         <tr>
893           <td></td>
894           <td></td>
895           <td class="md" nowrap>std::string&nbsp;</td>
896           <td class="mdname" nowrap>&nbsp; <em>text</em>, </td>
897         </tr>
898         <tr>
899           <td></td>
900           <td></td>
901           <td class="md" nowrap>bool&nbsp;</td>
902           <td class="mdname" nowrap>&nbsp; <em>IncludeSender</em></td>
903         </tr>
904         <tr>
905           <td></td>
906           <td class="md">)&nbsp;</td>
907           <td class="md" colspan="2"><code> [virtual]</code></td>
908         </tr>
909
910       </table>
911     </td>
912   </tr>
913 </table>
914 <table cellspacing=5 cellpadding=0 border=0>
915   <tr>
916     <td>
917       &nbsp;
918     </td>
919     <td>
920
921 <p>
922 Sends text from a user to one or more channels (mulicast).
923 <p>
924 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.
925 <p>
926 Definition at line <a class="el" href="modules_8cpp-source.html#l00221">221</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
927 <p>
928 <div class="fragment"><pre>00222 {
929 00223         <span class="keywordflow">if</span> (IncludeSender)
930 00224         {
931 00225                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
932 00226         }
933 00227         <span class="keywordflow">else</span>
934 00228         {
935 00229                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
936 00230         }
937 00231 }
938 </pre></div>    </td>
939   </tr>
940 </table>
941 <a name="a6" doxytag="Server::SendFrom"></a><p>
942 <table width="100%" cellpadding="2" cellspacing="0" border="0">
943   <tr>
944     <td class="md">
945       <table cellpadding="0" cellspacing="0" border="0">
946         <tr>
947           <td class="md" nowrap valign="top"> void Server::SendFrom </td>
948           <td class="md" valign="top">(&nbsp;</td>
949           <td class="md" nowrap valign="top">int&nbsp;</td>
950           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
951         </tr>
952         <tr>
953           <td></td>
954           <td></td>
955           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
956           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
957         </tr>
958         <tr>
959           <td></td>
960           <td></td>
961           <td class="md" nowrap>std::string&nbsp;</td>
962           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
963         </tr>
964         <tr>
965           <td></td>
966           <td class="md">)&nbsp;</td>
967           <td class="md" colspan="2"><code> [virtual]</code></td>
968         </tr>
969
970       </table>
971     </td>
972   </tr>
973 </table>
974 <table cellspacing=5 cellpadding=0 border=0>
975   <tr>
976     <td>
977       &nbsp;
978     </td>
979     <td>
980
981 <p>
982 Sends text from a user to a socket.
983 <p>
984 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)
985 <p>
986 Definition at line <a class="el" href="modules_8cpp-source.html#l00194">194</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
987 <p>
988 <div class="fragment"><pre>00195 {
989 00196         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
990 00197 }
991 </pre></div>    </td>
992   </tr>
993 </table>
994 <a name="a21" doxytag="Server::SendMode"></a><p>
995 <table width="100%" cellpadding="2" cellspacing="0" border="0">
996   <tr>
997     <td class="md">
998       <table cellpadding="0" cellspacing="0" border="0">
999         <tr>
1000           <td class="md" nowrap valign="top"> void Server::SendMode </td>
1001           <td class="md" valign="top">(&nbsp;</td>
1002           <td class="md" nowrap valign="top">char **&nbsp;</td>
1003           <td class="mdname" nowrap>&nbsp; <em>parameters</em>, </td>
1004         </tr>
1005         <tr>
1006           <td></td>
1007           <td></td>
1008           <td class="md" nowrap>int&nbsp;</td>
1009           <td class="mdname" nowrap>&nbsp; <em>pcnt</em>, </td>
1010         </tr>
1011         <tr>
1012           <td></td>
1013           <td></td>
1014           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1015           <td class="mdname" nowrap>&nbsp; <em>user</em></td>
1016         </tr>
1017         <tr>
1018           <td></td>
1019           <td class="md">)&nbsp;</td>
1020           <td class="md" colspan="2"><code> [virtual]</code></td>
1021         </tr>
1022
1023       </table>
1024     </td>
1025   </tr>
1026 </table>
1027 <table cellspacing=5 cellpadding=0 border=0>
1028   <tr>
1029     <td>
1030       &nbsp;
1031     </td>
1032     <td>
1033
1034 <p>
1035 Sends a servermode.
1036 <p>
1037 you must format the parameters array with the target, modes and parameters for those modes.<p>
1038 For example:<p>
1039 char *modes[3];<p>
1040 modes[0] = ChannelName;<p>
1041 modes[1] = "+o";<p>
1042 modes[2] = user-&gt;nick;<p>
1043 Srv-&gt;SendMode(modes,3,user);<p>
1044 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!
1045 <p>
1046 Definition at line <a class="el" href="modules_8cpp-source.html#l00179">179</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1047 <p>
1048 References <a class="el" href="modules_8h.html#a14">server_mode()</a>.
1049 <p>
1050 <div class="fragment"><pre>00180 {
1051 00181         <a class="code" href="modules_8h.html#a14">server_mode</a>(parameters,pcnt,user);
1052 00182 }
1053 </pre></div>    </td>
1054   </tr>
1055 </table>
1056 <a name="a2" doxytag="Server::SendOpers"></a><p>
1057 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1058   <tr>
1059     <td class="md">
1060       <table cellpadding="0" cellspacing="0" border="0">
1061         <tr>
1062           <td class="md" nowrap valign="top"> void Server::SendOpers </td>
1063           <td class="md" valign="top">(&nbsp;</td>
1064           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1065           <td class="mdname1" valign="top" nowrap>&nbsp; <em>s</em>          </td>
1066           <td class="md" valign="top">)&nbsp;</td>
1067           <td class="md" nowrap><code> [virtual]</code></td>
1068         </tr>
1069
1070       </table>
1071     </td>
1072   </tr>
1073 </table>
1074 <table cellspacing=5 cellpadding=0 border=0>
1075   <tr>
1076     <td>
1077       &nbsp;
1078     </td>
1079     <td>
1080
1081 <p>
1082 Sends text to all opers.
1083 <p>
1084 This method sends a server notice to all opers with the usermode +s.
1085 <p>
1086 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>.
1087 <p>
1088 <div class="fragment"><pre>00139 {
1089 00140         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
1090 00141 }
1091 </pre></div>    </td>
1092   </tr>
1093 </table>
1094 <a name="a5" doxytag="Server::SendServ"></a><p>
1095 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1096   <tr>
1097     <td class="md">
1098       <table cellpadding="0" cellspacing="0" border="0">
1099         <tr>
1100           <td class="md" nowrap valign="top"> void Server::SendServ </td>
1101           <td class="md" valign="top">(&nbsp;</td>
1102           <td class="md" nowrap valign="top">int&nbsp;</td>
1103           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
1104         </tr>
1105         <tr>
1106           <td></td>
1107           <td></td>
1108           <td class="md" nowrap>std::string&nbsp;</td>
1109           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
1110         </tr>
1111         <tr>
1112           <td></td>
1113           <td class="md">)&nbsp;</td>
1114           <td class="md" colspan="2"><code> [virtual]</code></td>
1115         </tr>
1116
1117       </table>
1118     </td>
1119   </tr>
1120 </table>
1121 <table cellspacing=5 cellpadding=0 border=0>
1122   <tr>
1123     <td>
1124       &nbsp;
1125     </td>
1126     <td>
1127
1128 <p>
1129 Sends text from the server to a socket.
1130 <p>
1131 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
1132 <p>
1133 Definition at line <a class="el" href="modules_8cpp-source.html#l00189">189</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1134 <p>
1135 <div class="fragment"><pre>00190 {
1136 00191         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
1137 00192 }
1138 </pre></div>    </td>
1139   </tr>
1140 </table>
1141 <a name="a7" doxytag="Server::SendTo"></a><p>
1142 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1143   <tr>
1144     <td class="md">
1145       <table cellpadding="0" cellspacing="0" border="0">
1146         <tr>
1147           <td class="md" nowrap valign="top"> void Server::SendTo </td>
1148           <td class="md" valign="top">(&nbsp;</td>
1149           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1150           <td class="mdname" nowrap>&nbsp; <em>Source</em>, </td>
1151         </tr>
1152         <tr>
1153           <td></td>
1154           <td></td>
1155           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1156           <td class="mdname" nowrap>&nbsp; <em>Dest</em>, </td>
1157         </tr>
1158         <tr>
1159           <td></td>
1160           <td></td>
1161           <td class="md" nowrap>std::string&nbsp;</td>
1162           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
1163         </tr>
1164         <tr>
1165           <td></td>
1166           <td class="md">)&nbsp;</td>
1167           <td class="md" colspan="2"><code> [virtual]</code></td>
1168         </tr>
1169
1170       </table>
1171     </td>
1172   </tr>
1173 </table>
1174 <table cellspacing=5 cellpadding=0 border=0>
1175   <tr>
1176     <td>
1177       &nbsp;
1178     </td>
1179     <td>
1180
1181 <p>
1182 Sends text from a user to another user.
1183 <p>
1184 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)
1185 <p>
1186 Definition at line <a class="el" href="modules_8cpp-source.html#l00199">199</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1187 <p>
1188 <div class="fragment"><pre>00200 {
1189 00201         WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
1190 00202 }
1191 </pre></div>    </td>
1192   </tr>
1193 </table>
1194 <a name="a22" doxytag="Server::SendToModeMask"></a><p>
1195 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1196   <tr>
1197     <td class="md">
1198       <table cellpadding="0" cellspacing="0" border="0">
1199         <tr>
1200           <td class="md" nowrap valign="top"> void Server::SendToModeMask </td>
1201           <td class="md" valign="top">(&nbsp;</td>
1202           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1203           <td class="mdname" nowrap>&nbsp; <em>modes</em>, </td>
1204         </tr>
1205         <tr>
1206           <td></td>
1207           <td></td>
1208           <td class="md" nowrap>int&nbsp;</td>
1209           <td class="mdname" nowrap>&nbsp; <em>flags</em>, </td>
1210         </tr>
1211         <tr>
1212           <td></td>
1213           <td></td>
1214           <td class="md" nowrap>std::string&nbsp;</td>
1215           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
1216         </tr>
1217         <tr>
1218           <td></td>
1219           <td class="md">)&nbsp;</td>
1220           <td class="md" colspan="2"><code> [virtual]</code></td>
1221         </tr>
1222
1223       </table>
1224     </td>
1225   </tr>
1226 </table>
1227 <table cellspacing=5 cellpadding=0 border=0>
1228   <tr>
1229     <td>
1230       &nbsp;
1231     </td>
1232     <td>
1233
1234 <p>
1235 Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter.
1236 <p>
1237 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>
1238 Serv-&gt;SendToModeMask("xi", WM_OR, "m00");<p>
1239 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.
1240 <p>
1241 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>.
1242 <p>
1243 <div class="fragment"><pre>00144 {
1244 00145         WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str());
1245 00146 }
1246 </pre></div>    </td>
1247   </tr>
1248 </table>
1249 <a name="a11" doxytag="Server::SendWallops"></a><p>
1250 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1251   <tr>
1252     <td class="md">
1253       <table cellpadding="0" cellspacing="0" border="0">
1254         <tr>
1255           <td class="md" nowrap valign="top"> void Server::SendWallops </td>
1256           <td class="md" valign="top">(&nbsp;</td>
1257           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1258           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
1259         </tr>
1260         <tr>
1261           <td></td>
1262           <td></td>
1263           <td class="md" nowrap>std::string&nbsp;</td>
1264           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
1265         </tr>
1266         <tr>
1267           <td></td>
1268           <td class="md">)&nbsp;</td>
1269           <td class="md" colspan="2"><code> [virtual]</code></td>
1270         </tr>
1271
1272       </table>
1273     </td>
1274   </tr>
1275 </table>
1276 <table cellspacing=5 cellpadding=0 border=0>
1277   <tr>
1278     <td>
1279       &nbsp;
1280     </td>
1281     <td>
1282
1283 <p>
1284 Sends a WALLOPS message.
1285 <p>
1286 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
1287 <p>
1288 Definition at line <a class="el" href="modules_8cpp-source.html#l00233">233</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1289 <p>
1290 <div class="fragment"><pre>00234 {
1291 00235         WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str());
1292 00236 }
1293 </pre></div>    </td>
1294   </tr>
1295 </table>
1296 <a name="a23" doxytag="Server::Server::JoinUserToChannel"></a><p>
1297 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1298   <tr>
1299     <td class="md">
1300       <table cellpadding="0" cellspacing="0" border="0">
1301         <tr>
1302           <td class="md" nowrap valign="top"> virtual <a class="el" href="classchanrec.html">chanrec</a>* Server::Server::JoinUserToChannel </td>
1303           <td class="md" valign="top">(&nbsp;</td>
1304           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1305           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
1306         </tr>
1307         <tr>
1308           <td></td>
1309           <td></td>
1310           <td class="md" nowrap>std::string&nbsp;</td>
1311           <td class="mdname" nowrap>&nbsp; <em>cname</em>, </td>
1312         </tr>
1313         <tr>
1314           <td></td>
1315           <td></td>
1316           <td class="md" nowrap>std::string&nbsp;</td>
1317           <td class="mdname" nowrap>&nbsp; <em>key</em></td>
1318         </tr>
1319         <tr>
1320           <td></td>
1321           <td class="md">)&nbsp;</td>
1322           <td class="md" colspan="2"><code> [virtual]</code></td>
1323         </tr>
1324
1325       </table>
1326     </td>
1327   </tr>
1328 </table>
1329 <table cellspacing=5 cellpadding=0 border=0>
1330   <tr>
1331     <td>
1332       &nbsp;
1333     </td>
1334     <td>
1335
1336 <p>
1337 Forces a user to join a channel.
1338 <p>
1339 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>
1340   </tr>
1341 </table>
1342 <a name="a24" doxytag="Server::Server::PartUserFromChannel"></a><p>
1343 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1344   <tr>
1345     <td class="md">
1346       <table cellpadding="0" cellspacing="0" border="0">
1347         <tr>
1348           <td class="md" nowrap valign="top"> virtual <a class="el" href="classchanrec.html">chanrec</a>* Server::Server::PartUserFromChannel </td>
1349           <td class="md" valign="top">(&nbsp;</td>
1350           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1351           <td class="mdname" nowrap>&nbsp; <em>user</em>, </td>
1352         </tr>
1353         <tr>
1354           <td></td>
1355           <td></td>
1356           <td class="md" nowrap>std::string&nbsp;</td>
1357           <td class="mdname" nowrap>&nbsp; <em>cname</em>, </td>
1358         </tr>
1359         <tr>
1360           <td></td>
1361           <td></td>
1362           <td class="md" nowrap>std::string&nbsp;</td>
1363           <td class="mdname" nowrap>&nbsp; <em>reason</em></td>
1364         </tr>
1365         <tr>
1366           <td></td>
1367           <td class="md">)&nbsp;</td>
1368           <td class="md" colspan="2"><code> [virtual]</code></td>
1369         </tr>
1370
1371       </table>
1372     </td>
1373   </tr>
1374 </table>
1375 <table cellspacing=5 cellpadding=0 border=0>
1376   <tr>
1377     <td>
1378       &nbsp;
1379     </td>
1380     <td>
1381
1382 <p>
1383 Forces a user to part a channel.
1384 <p>
1385 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>
1386   </tr>
1387 </table>
1388 <hr>The documentation for this class was generated from the following files:<ul>
1389 <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>
1390 <hr><address style="align: right;"><small>Generated on Tue Apr 6 21:14:13 2004 for InspIRCd by
1391 <a href="http://www.doxygen.org/index.html">
1392 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
1393 width=110 height=53></a>1.3-rc3 </small></address>
1394 </body>
1395 </html>