]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classServer.html
New documentation to document user/channel mode handling
[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 </table>
70 <hr><a name="_details"></a><h2>Detailed Description</h2>
71 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.
72 <p>
73 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. 
74 <p>
75
76 <p>
77 Definition at line <a class="el" href="modules_8h-source.html#l00196">196</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
78 <a name="a0" doxytag="Server::Server"></a><p>
79 <table width="100%" cellpadding="2" cellspacing="0" border="0">
80   <tr>
81     <td class="md">
82       <table cellpadding="0" cellspacing="0" border="0">
83         <tr>
84           <td class="md" nowrap valign="top"> Server::Server </td>
85           <td class="md" valign="top">(&nbsp;</td>
86           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
87           <td class="md" valign="top">)&nbsp;</td>
88           <td class="md" nowrap></td>
89         </tr>
90
91       </table>
92     </td>
93   </tr>
94 </table>
95 <table cellspacing=5 cellpadding=0 border=0>
96   <tr>
97     <td>
98       &nbsp;
99     </td>
100     <td>
101
102 <p>
103 Default constructor.
104 <p>
105 Creates a Server object.
106 <p>
107 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>.
108 <p>
109 <div class="fragment"><pre>00126 {
110 00127 }
111 </pre></div>    </td>
112   </tr>
113 </table>
114 <a name="a1" doxytag="Server::~Server"></a><p>
115 <table width="100%" cellpadding="2" cellspacing="0" border="0">
116   <tr>
117     <td class="md">
118       <table cellpadding="0" cellspacing="0" border="0">
119         <tr>
120           <td class="md" nowrap valign="top"> Server::~Server </td>
121           <td class="md" valign="top">(&nbsp;</td>
122           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
123           <td class="md" valign="top">)&nbsp;</td>
124           <td class="md" nowrap><code> [virtual]</code></td>
125         </tr>
126
127       </table>
128     </td>
129   </tr>
130 </table>
131 <table cellspacing=5 cellpadding=0 border=0>
132   <tr>
133     <td>
134       &nbsp;
135     </td>
136     <td>
137
138 <p>
139 Default destructor.
140 <p>
141 Destroys a Server object.
142 <p>
143 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>.
144 <p>
145 <div class="fragment"><pre>00130 {
146 00131 }
147 </pre></div>    </td>
148   </tr>
149 </table>
150 <hr><h2>Member Function Documentation</h2>
151 <a name="a20" doxytag="Server::AddCommand"></a><p>
152 <table width="100%" cellpadding="2" cellspacing="0" border="0">
153   <tr>
154     <td class="md">
155       <table cellpadding="0" cellspacing="0" border="0">
156         <tr>
157           <td class="md" nowrap valign="top"> void Server::AddCommand </td>
158           <td class="md" valign="top">(&nbsp;</td>
159           <td class="md" nowrap valign="top">char *&nbsp;</td>
160           <td class="mdname" nowrap>&nbsp; <em>cmd</em>, </td>
161         </tr>
162         <tr>
163           <td></td>
164           <td></td>
165           <td class="md" nowrap><a class="el" href="ctables_8h.html#a0">handlerfunc</a>&nbsp;</td>
166           <td class="mdname" nowrap>&nbsp; <em>f</em>, </td>
167         </tr>
168         <tr>
169           <td></td>
170           <td></td>
171           <td class="md" nowrap>char&nbsp;</td>
172           <td class="mdname" nowrap>&nbsp; <em>flags</em>, </td>
173         </tr>
174         <tr>
175           <td></td>
176           <td></td>
177           <td class="md" nowrap>int&nbsp;</td>
178           <td class="mdname" nowrap>&nbsp; <em>minparams</em></td>
179         </tr>
180         <tr>
181           <td></td>
182           <td class="md">)&nbsp;</td>
183           <td class="md" colspan="2"><code> [virtual]</code></td>
184         </tr>
185
186       </table>
187     </td>
188   </tr>
189 </table>
190 <table cellspacing=5 cellpadding=0 border=0>
191   <tr>
192     <td>
193       &nbsp;
194     </td>
195     <td>
196
197 <p>
198 Adds a command to the command table.
199 <p>
200 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>
201 typedef void (handlerfunc) (char**, int, userrec*); ... void handle_kill(char **parameters, int pcnt, userrec *user)<p>
202 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'.
203 <p>
204 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>.
205 <p>
206 References <a class="el" href="modules_8h.html#a13">createcommand()</a>.
207 <p>
208 <div class="fragment"><pre>00144 {
209 00145         <a class="code" href="modules_8h.html#a13">createcommand</a>(cmd,f,flags,minparams);
210 00146 }
211 </pre></div>    </td>
212   </tr>
213 </table>
214 <a name="a19" doxytag="Server::AddExtendedMode"></a><p>
215 <table width="100%" cellpadding="2" cellspacing="0" border="0">
216   <tr>
217     <td class="md">
218       <table cellpadding="0" cellspacing="0" border="0">
219         <tr>
220           <td class="md" nowrap valign="top"> bool Server::AddExtendedMode </td>
221           <td class="md" valign="top">(&nbsp;</td>
222           <td class="md" nowrap valign="top">char&nbsp;</td>
223           <td class="mdname" nowrap>&nbsp; <em>modechar</em>, </td>
224         </tr>
225         <tr>
226           <td></td>
227           <td></td>
228           <td class="md" nowrap>int&nbsp;</td>
229           <td class="mdname" nowrap>&nbsp; <em>type</em>, </td>
230         </tr>
231         <tr>
232           <td></td>
233           <td></td>
234           <td class="md" nowrap>bool&nbsp;</td>
235           <td class="mdname" nowrap>&nbsp; <em>requires_oper</em>, </td>
236         </tr>
237         <tr>
238           <td></td>
239           <td></td>
240           <td class="md" nowrap>int&nbsp;</td>
241           <td class="mdname" nowrap>&nbsp; <em>params_when_on</em>, </td>
242         </tr>
243         <tr>
244           <td></td>
245           <td></td>
246           <td class="md" nowrap>int&nbsp;</td>
247           <td class="mdname" nowrap>&nbsp; <em>params_when_off</em></td>
248         </tr>
249         <tr>
250           <td></td>
251           <td class="md">)&nbsp;</td>
252           <td class="md" colspan="2"><code> [virtual]</code></td>
253         </tr>
254
255       </table>
256     </td>
257   </tr>
258 </table>
259 <table cellspacing=5 cellpadding=0 border=0>
260   <tr>
261     <td>
262       &nbsp;
263     </td>
264     <td>
265
266 <p>
267 Adds an extended mode letter which is parsed by a module This allows modules to add extra mode letters, e.g.
268 <p>
269 +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.
270 <p>
271 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>.
272 <p>
273 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>.
274 <p>
275 <div class="fragment"><pre>00245 {
276 00246         <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#a7">MT_SERVER</a>)
277 00247         {
278 00248                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>);
279 00249                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
280 00250         }
281 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>))
282 00252         {
283 00253                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>);
284 00254                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
285 00255         }
286 00256         <span class="keywordflow">if</span> ((params_when_on&gt;1) || (params_when_off&gt;1))
287 00257         {
288 00258                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>);
289 00259                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
290 00260         }
291 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);
292 00262 }
293 </pre></div>    </td>
294   </tr>
295 </table>
296 <a name="a15" doxytag="Server::ChanMode"></a><p>
297 <table width="100%" cellpadding="2" cellspacing="0" border="0">
298   <tr>
299     <td class="md">
300       <table cellpadding="0" cellspacing="0" border="0">
301         <tr>
302           <td class="md" nowrap valign="top"> std::string Server::ChanMode </td>
303           <td class="md" valign="top">(&nbsp;</td>
304           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
305           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
306         </tr>
307         <tr>
308           <td></td>
309           <td></td>
310           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
311           <td class="mdname" nowrap>&nbsp; <em>Chan</em></td>
312         </tr>
313         <tr>
314           <td></td>
315           <td class="md">)&nbsp;</td>
316           <td class="md" colspan="2"><code> [virtual]</code></td>
317         </tr>
318
319       </table>
320     </td>
321   </tr>
322 </table>
323 <table cellspacing=5 cellpadding=0 border=0>
324   <tr>
325     <td>
326       &nbsp;
327     </td>
328     <td>
329
330 <p>
331 Attempts to look up a user's privilages on a channel.
332 <p>
333 This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.
334 <p>
335 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>.
336 <p>
337 <div class="fragment"><pre>00223 {
338 00224         <span class="keywordflow">return</span> cmode(User,Chan);
339 00225 }
340 </pre></div>    </td>
341   </tr>
342 </table>
343 <a name="a9" doxytag="Server::CommonChannels"></a><p>
344 <table width="100%" cellpadding="2" cellspacing="0" border="0">
345   <tr>
346     <td class="md">
347       <table cellpadding="0" cellspacing="0" border="0">
348         <tr>
349           <td class="md" nowrap valign="top"> bool Server::CommonChannels </td>
350           <td class="md" valign="top">(&nbsp;</td>
351           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
352           <td class="mdname" nowrap>&nbsp; <em>u1</em>, </td>
353         </tr>
354         <tr>
355           <td></td>
356           <td></td>
357           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
358           <td class="mdname" nowrap>&nbsp; <em>u2</em></td>
359         </tr>
360         <tr>
361           <td></td>
362           <td class="md">)&nbsp;</td>
363           <td class="md" colspan="2"><code> [virtual]</code></td>
364         </tr>
365
366       </table>
367     </td>
368   </tr>
369 </table>
370 <table cellspacing=5 cellpadding=0 border=0>
371   <tr>
372     <td>
373       &nbsp;
374     </td>
375     <td>
376
377 <p>
378 Returns true if two users share a common channel.
379 <p>
380 This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#a10">Server::SendCommon</a> method.
381 <p>
382 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>.
383 <p>
384 <div class="fragment"><pre>00186 {
385 00187         <span class="keywordflow">return</span> (common_channels(u1,u2) != 0);
386 00188 }
387 </pre></div>    </td>
388   </tr>
389 </table>
390 <a name="a14" doxytag="Server::FindChannel"></a><p>
391 <table width="100%" cellpadding="2" cellspacing="0" border="0">
392   <tr>
393     <td class="md">
394       <table cellpadding="0" cellspacing="0" border="0">
395         <tr>
396           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
397           <td class="md" valign="top">(&nbsp;</td>
398           <td class="md" nowrap valign="top">std::string&nbsp;</td>
399           <td class="mdname1" valign="top" nowrap>&nbsp; <em>channel</em>          </td>
400           <td class="md" valign="top">)&nbsp;</td>
401           <td class="md" nowrap><code> [virtual]</code></td>
402         </tr>
403
404       </table>
405     </td>
406   </tr>
407 </table>
408 <table cellspacing=5 cellpadding=0 border=0>
409   <tr>
410     <td>
411       &nbsp;
412     </td>
413     <td>
414
415 <p>
416 Attempts to look up a channel and return a pointer to it.
417 <p>
418 This function will return NULL if the channel does not exist.
419 <p>
420 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>.
421 <p>
422 <div class="fragment"><pre>00218 {
423 00219         <span class="keywordflow">return</span> FindChan(channel.c_str());
424 00220 }
425 </pre></div>    </td>
426   </tr>
427 </table>
428 <a name="a13" doxytag="Server::FindNick"></a><p>
429 <table width="100%" cellpadding="2" cellspacing="0" border="0">
430   <tr>
431     <td class="md">
432       <table cellpadding="0" cellspacing="0" border="0">
433         <tr>
434           <td class="md" nowrap valign="top"> <a class="el" href="classuserrec.html">userrec</a> * Server::FindNick </td>
435           <td class="md" valign="top">(&nbsp;</td>
436           <td class="md" nowrap valign="top">std::string&nbsp;</td>
437           <td class="mdname1" valign="top" nowrap>&nbsp; <em>nick</em>          </td>
438           <td class="md" valign="top">)&nbsp;</td>
439           <td class="md" nowrap><code> [virtual]</code></td>
440         </tr>
441
442       </table>
443     </td>
444   </tr>
445 </table>
446 <table cellspacing=5 cellpadding=0 border=0>
447   <tr>
448     <td>
449       &nbsp;
450     </td>
451     <td>
452
453 <p>
454 Attempts to look up a nick and return a pointer to it.
455 <p>
456 This function will return NULL if the nick does not exist.
457 <p>
458 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>.
459 <p>
460 <div class="fragment"><pre>00213 {
461 00214         <span class="keywordflow">return</span> Find(nick);
462 00215 }
463 </pre></div>    </td>
464   </tr>
465 </table>
466 <a name="a18" doxytag="Server::GetAdmin"></a><p>
467 <table width="100%" cellpadding="2" cellspacing="0" border="0">
468   <tr>
469     <td class="md">
470       <table cellpadding="0" cellspacing="0" border="0">
471         <tr>
472           <td class="md" nowrap valign="top"> <a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
473           <td class="md" valign="top">(&nbsp;</td>
474           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
475           <td class="md" valign="top">)&nbsp;</td>
476           <td class="md" nowrap><code> [virtual]</code></td>
477         </tr>
478
479       </table>
480     </td>
481   </tr>
482 </table>
483 <table cellspacing=5 cellpadding=0 border=0>
484   <tr>
485     <td>
486       &nbsp;
487     </td>
488     <td>
489
490 <p>
491 Returns the information of the server as returned by the /ADMIN command.
492 <p>
493 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.
494 <p>
495 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>.
496 <p>
497 <div class="fragment"><pre>00238 {
498 00239         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
499 00240 }
500 </pre></div>    </td>
501   </tr>
502 </table>
503 <a name="a17" doxytag="Server::GetNetworkName"></a><p>
504 <table width="100%" cellpadding="2" cellspacing="0" border="0">
505   <tr>
506     <td class="md">
507       <table cellpadding="0" cellspacing="0" border="0">
508         <tr>
509           <td class="md" nowrap valign="top"> std::string Server::GetNetworkName </td>
510           <td class="md" valign="top">(&nbsp;</td>
511           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
512           <td class="md" valign="top">)&nbsp;</td>
513           <td class="md" nowrap><code> [virtual]</code></td>
514         </tr>
515
516       </table>
517     </td>
518   </tr>
519 </table>
520 <table cellspacing=5 cellpadding=0 border=0>
521   <tr>
522     <td>
523       &nbsp;
524     </td>
525     <td>
526
527 <p>
528 Returns the network name, global to all linked servers.
529 <p>
530
531 <p>
532 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>.
533 <p>
534 <div class="fragment"><pre>00233 {
535 00234         <span class="keywordflow">return</span> getnetworkname();
536 00235 }
537 </pre></div>    </td>
538   </tr>
539 </table>
540 <a name="a16" doxytag="Server::GetServerName"></a><p>
541 <table width="100%" cellpadding="2" cellspacing="0" border="0">
542   <tr>
543     <td class="md">
544       <table cellpadding="0" cellspacing="0" border="0">
545         <tr>
546           <td class="md" nowrap valign="top"> std::string Server::GetServerName </td>
547           <td class="md" valign="top">(&nbsp;</td>
548           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
549           <td class="md" valign="top">)&nbsp;</td>
550           <td class="md" nowrap><code> [virtual]</code></td>
551         </tr>
552
553       </table>
554     </td>
555   </tr>
556 </table>
557 <table cellspacing=5 cellpadding=0 border=0>
558   <tr>
559     <td>
560       &nbsp;
561     </td>
562     <td>
563
564 <p>
565 Returns the server name of the server where the module is loaded.
566 <p>
567
568 <p>
569 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>.
570 <p>
571 <div class="fragment"><pre>00228 {
572 00229         <span class="keywordflow">return</span> getservername();
573 00230 }
574 </pre></div>    </td>
575   </tr>
576 </table>
577 <a name="a12" doxytag="Server::IsNick"></a><p>
578 <table width="100%" cellpadding="2" cellspacing="0" border="0">
579   <tr>
580     <td class="md">
581       <table cellpadding="0" cellspacing="0" border="0">
582         <tr>
583           <td class="md" nowrap valign="top"> bool Server::IsNick </td>
584           <td class="md" valign="top">(&nbsp;</td>
585           <td class="md" nowrap valign="top">std::string&nbsp;</td>
586           <td class="mdname1" valign="top" nowrap>&nbsp; <em>nick</em>          </td>
587           <td class="md" valign="top">)&nbsp;</td>
588           <td class="md" nowrap><code> [virtual]</code></td>
589         </tr>
590
591       </table>
592     </td>
593   </tr>
594 </table>
595 <table cellspacing=5 cellpadding=0 border=0>
596   <tr>
597     <td>
598       &nbsp;
599     </td>
600     <td>
601
602 <p>
603 Returns true if a nick is valid.
604 <p>
605 Nicks for unregistered connections will return false.
606 <p>
607 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>.
608 <p>
609 <div class="fragment"><pre>00208 {
610 00209         <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0);
611 00210 }
612 </pre></div>    </td>
613   </tr>
614 </table>
615 <a name="a3" doxytag="Server::Log"></a><p>
616 <table width="100%" cellpadding="2" cellspacing="0" border="0">
617   <tr>
618     <td class="md">
619       <table cellpadding="0" cellspacing="0" border="0">
620         <tr>
621           <td class="md" nowrap valign="top"> void Server::Log </td>
622           <td class="md" valign="top">(&nbsp;</td>
623           <td class="md" nowrap valign="top">int&nbsp;</td>
624           <td class="mdname" nowrap>&nbsp; <em>level</em>, </td>
625         </tr>
626         <tr>
627           <td></td>
628           <td></td>
629           <td class="md" nowrap>std::string&nbsp;</td>
630           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
631         </tr>
632         <tr>
633           <td></td>
634           <td class="md">)&nbsp;</td>
635           <td class="md" colspan="2"><code> [virtual]</code></td>
636         </tr>
637
638       </table>
639     </td>
640   </tr>
641 </table>
642 <table cellspacing=5 cellpadding=0 border=0>
643   <tr>
644     <td>
645       &nbsp;
646     </td>
647     <td>
648
649 <p>
650 Writes a log string.
651 <p>
652 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.
653 <p>
654 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>.
655 <p>
656 <div class="fragment"><pre>00139 {
657 00140         log(level,<span class="stringliteral">"%s"</span>,s.c_str());
658 00141 }
659 </pre></div>    </td>
660   </tr>
661 </table>
662 <a name="a4" doxytag="Server::Send"></a><p>
663 <table width="100%" cellpadding="2" cellspacing="0" border="0">
664   <tr>
665     <td class="md">
666       <table cellpadding="0" cellspacing="0" border="0">
667         <tr>
668           <td class="md" nowrap valign="top"> void Server::Send </td>
669           <td class="md" valign="top">(&nbsp;</td>
670           <td class="md" nowrap valign="top">int&nbsp;</td>
671           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
672         </tr>
673         <tr>
674           <td></td>
675           <td></td>
676           <td class="md" nowrap>std::string&nbsp;</td>
677           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
678         </tr>
679         <tr>
680           <td></td>
681           <td class="md">)&nbsp;</td>
682           <td class="md" colspan="2"><code> [virtual]</code></td>
683         </tr>
684
685       </table>
686     </td>
687   </tr>
688 </table>
689 <table cellspacing=5 cellpadding=0 border=0>
690   <tr>
691     <td>
692       &nbsp;
693     </td>
694     <td>
695
696 <p>
697 Sends a line of text down a TCP/IP socket.
698 <p>
699 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
700 <p>
701 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>.
702 <p>
703 <div class="fragment"><pre>00154 {
704 00155         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
705 00156 }
706 </pre></div>    </td>
707   </tr>
708 </table>
709 <a name="a8" doxytag="Server::SendChannel"></a><p>
710 <table width="100%" cellpadding="2" cellspacing="0" border="0">
711   <tr>
712     <td class="md">
713       <table cellpadding="0" cellspacing="0" border="0">
714         <tr>
715           <td class="md" nowrap valign="top"> void Server::SendChannel </td>
716           <td class="md" valign="top">(&nbsp;</td>
717           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
718           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
719         </tr>
720         <tr>
721           <td></td>
722           <td></td>
723           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
724           <td class="mdname" nowrap>&nbsp; <em>Channel</em>, </td>
725         </tr>
726         <tr>
727           <td></td>
728           <td></td>
729           <td class="md" nowrap>std::string&nbsp;</td>
730           <td class="mdname" nowrap>&nbsp; <em>s</em>, </td>
731         </tr>
732         <tr>
733           <td></td>
734           <td></td>
735           <td class="md" nowrap>bool&nbsp;</td>
736           <td class="mdname" nowrap>&nbsp; <em>IncludeSender</em></td>
737         </tr>
738         <tr>
739           <td></td>
740           <td class="md">)&nbsp;</td>
741           <td class="md" colspan="2"><code> [virtual]</code></td>
742         </tr>
743
744       </table>
745     </td>
746   </tr>
747 </table>
748 <table cellspacing=5 cellpadding=0 border=0>
749   <tr>
750     <td>
751       &nbsp;
752     </td>
753     <td>
754
755 <p>
756 Sends text from a user to a channel (mulicast).
757 <p>
758 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).
759 <p>
760 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>.
761 <p>
762 <div class="fragment"><pre>00174 {
763 00175         <span class="keywordflow">if</span> (IncludeSender)
764 00176         {
765 00177                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
766 00178         }
767 00179         <span class="keywordflow">else</span>
768 00180         {
769 00181                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
770 00182         }
771 00183 }
772 </pre></div>    </td>
773   </tr>
774 </table>
775 <a name="a10" doxytag="Server::SendCommon"></a><p>
776 <table width="100%" cellpadding="2" cellspacing="0" border="0">
777   <tr>
778     <td class="md">
779       <table cellpadding="0" cellspacing="0" border="0">
780         <tr>
781           <td class="md" nowrap valign="top"> void Server::SendCommon </td>
782           <td class="md" valign="top">(&nbsp;</td>
783           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
784           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
785         </tr>
786         <tr>
787           <td></td>
788           <td></td>
789           <td class="md" nowrap>std::string&nbsp;</td>
790           <td class="mdname" nowrap>&nbsp; <em>text</em>, </td>
791         </tr>
792         <tr>
793           <td></td>
794           <td></td>
795           <td class="md" nowrap>bool&nbsp;</td>
796           <td class="mdname" nowrap>&nbsp; <em>IncludeSender</em></td>
797         </tr>
798         <tr>
799           <td></td>
800           <td class="md">)&nbsp;</td>
801           <td class="md" colspan="2"><code> [virtual]</code></td>
802         </tr>
803
804       </table>
805     </td>
806   </tr>
807 </table>
808 <table cellspacing=5 cellpadding=0 border=0>
809   <tr>
810     <td>
811       &nbsp;
812     </td>
813     <td>
814
815 <p>
816 Sends text from a user to one or more channels (mulicast).
817 <p>
818 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.
819 <p>
820 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>.
821 <p>
822 <div class="fragment"><pre>00191 {
823 00192         <span class="keywordflow">if</span> (IncludeSender)
824 00193         {
825 00194                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
826 00195         }
827 00196         <span class="keywordflow">else</span>
828 00197         {
829 00198                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
830 00199         }
831 00200 }
832 </pre></div>    </td>
833   </tr>
834 </table>
835 <a name="a6" doxytag="Server::SendFrom"></a><p>
836 <table width="100%" cellpadding="2" cellspacing="0" border="0">
837   <tr>
838     <td class="md">
839       <table cellpadding="0" cellspacing="0" border="0">
840         <tr>
841           <td class="md" nowrap valign="top"> void Server::SendFrom </td>
842           <td class="md" valign="top">(&nbsp;</td>
843           <td class="md" nowrap valign="top">int&nbsp;</td>
844           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
845         </tr>
846         <tr>
847           <td></td>
848           <td></td>
849           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
850           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
851         </tr>
852         <tr>
853           <td></td>
854           <td></td>
855           <td class="md" nowrap>std::string&nbsp;</td>
856           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
857         </tr>
858         <tr>
859           <td></td>
860           <td class="md">)&nbsp;</td>
861           <td class="md" colspan="2"><code> [virtual]</code></td>
862         </tr>
863
864       </table>
865     </td>
866   </tr>
867 </table>
868 <table cellspacing=5 cellpadding=0 border=0>
869   <tr>
870     <td>
871       &nbsp;
872     </td>
873     <td>
874
875 <p>
876 Sends text from a user to a socket.
877 <p>
878 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)
879 <p>
880 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>.
881 <p>
882 <div class="fragment"><pre>00164 {
883 00165         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
884 00166 }
885 </pre></div>    </td>
886   </tr>
887 </table>
888 <a name="a21" doxytag="Server::SendMode"></a><p>
889 <table width="100%" cellpadding="2" cellspacing="0" border="0">
890   <tr>
891     <td class="md">
892       <table cellpadding="0" cellspacing="0" border="0">
893         <tr>
894           <td class="md" nowrap valign="top"> void Server::SendMode </td>
895           <td class="md" valign="top">(&nbsp;</td>
896           <td class="md" nowrap valign="top">char **&nbsp;</td>
897           <td class="mdname" nowrap>&nbsp; <em>parameters</em>, </td>
898         </tr>
899         <tr>
900           <td></td>
901           <td></td>
902           <td class="md" nowrap>int&nbsp;</td>
903           <td class="mdname" nowrap>&nbsp; <em>pcnt</em>, </td>
904         </tr>
905         <tr>
906           <td></td>
907           <td></td>
908           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
909           <td class="mdname" nowrap>&nbsp; <em>user</em></td>
910         </tr>
911         <tr>
912           <td></td>
913           <td class="md">)&nbsp;</td>
914           <td class="md" colspan="2"><code> [virtual]</code></td>
915         </tr>
916
917       </table>
918     </td>
919   </tr>
920 </table>
921 <table cellspacing=5 cellpadding=0 border=0>
922   <tr>
923     <td>
924       &nbsp;
925     </td>
926     <td>
927
928 <p>
929 Sends a servermode.
930 <p>
931 you must format the parameters array with the target, modes and parameters for those modes.<p>
932 For example:<p>
933 char *modes[3];<p>
934 modes[0] = ChannelName;<p>
935 modes[1] = "+o";<p>
936 modes[2] = user-&gt;nick;<p>
937 Srv-&gt;SendMode(modes,3,user);<p>
938 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!
939 <p>
940 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>.
941 <p>
942 References <a class="el" href="modules_8h.html#a14">server_mode()</a>.
943 <p>
944 <div class="fragment"><pre>00149 {
945 00150         <a class="code" href="modules_8h.html#a14">server_mode</a>(parameters,pcnt,user);
946 00151 }
947 </pre></div>    </td>
948   </tr>
949 </table>
950 <a name="a2" doxytag="Server::SendOpers"></a><p>
951 <table width="100%" cellpadding="2" cellspacing="0" border="0">
952   <tr>
953     <td class="md">
954       <table cellpadding="0" cellspacing="0" border="0">
955         <tr>
956           <td class="md" nowrap valign="top"> void Server::SendOpers </td>
957           <td class="md" valign="top">(&nbsp;</td>
958           <td class="md" nowrap valign="top">std::string&nbsp;</td>
959           <td class="mdname1" valign="top" nowrap>&nbsp; <em>s</em>          </td>
960           <td class="md" valign="top">)&nbsp;</td>
961           <td class="md" nowrap><code> [virtual]</code></td>
962         </tr>
963
964       </table>
965     </td>
966   </tr>
967 </table>
968 <table cellspacing=5 cellpadding=0 border=0>
969   <tr>
970     <td>
971       &nbsp;
972     </td>
973     <td>
974
975 <p>
976 Sends text to all opers.
977 <p>
978 This method sends a server notice to all opers with the usermode +s.
979 <p>
980 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>.
981 <p>
982 <div class="fragment"><pre>00134 {
983 00135         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
984 00136 }
985 </pre></div>    </td>
986   </tr>
987 </table>
988 <a name="a5" doxytag="Server::SendServ"></a><p>
989 <table width="100%" cellpadding="2" cellspacing="0" border="0">
990   <tr>
991     <td class="md">
992       <table cellpadding="0" cellspacing="0" border="0">
993         <tr>
994           <td class="md" nowrap valign="top"> void Server::SendServ </td>
995           <td class="md" valign="top">(&nbsp;</td>
996           <td class="md" nowrap valign="top">int&nbsp;</td>
997           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
998         </tr>
999         <tr>
1000           <td></td>
1001           <td></td>
1002           <td class="md" nowrap>std::string&nbsp;</td>
1003           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
1004         </tr>
1005         <tr>
1006           <td></td>
1007           <td class="md">)&nbsp;</td>
1008           <td class="md" colspan="2"><code> [virtual]</code></td>
1009         </tr>
1010
1011       </table>
1012     </td>
1013   </tr>
1014 </table>
1015 <table cellspacing=5 cellpadding=0 border=0>
1016   <tr>
1017     <td>
1018       &nbsp;
1019     </td>
1020     <td>
1021
1022 <p>
1023 Sends text from the server to a socket.
1024 <p>
1025 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
1026 <p>
1027 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>.
1028 <p>
1029 <div class="fragment"><pre>00159 {
1030 00160         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
1031 00161 }
1032 </pre></div>    </td>
1033   </tr>
1034 </table>
1035 <a name="a7" doxytag="Server::SendTo"></a><p>
1036 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1037   <tr>
1038     <td class="md">
1039       <table cellpadding="0" cellspacing="0" border="0">
1040         <tr>
1041           <td class="md" nowrap valign="top"> void Server::SendTo </td>
1042           <td class="md" valign="top">(&nbsp;</td>
1043           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1044           <td class="mdname" nowrap>&nbsp; <em>Source</em>, </td>
1045         </tr>
1046         <tr>
1047           <td></td>
1048           <td></td>
1049           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1050           <td class="mdname" nowrap>&nbsp; <em>Dest</em>, </td>
1051         </tr>
1052         <tr>
1053           <td></td>
1054           <td></td>
1055           <td class="md" nowrap>std::string&nbsp;</td>
1056           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
1057         </tr>
1058         <tr>
1059           <td></td>
1060           <td class="md">)&nbsp;</td>
1061           <td class="md" colspan="2"><code> [virtual]</code></td>
1062         </tr>
1063
1064       </table>
1065     </td>
1066   </tr>
1067 </table>
1068 <table cellspacing=5 cellpadding=0 border=0>
1069   <tr>
1070     <td>
1071       &nbsp;
1072     </td>
1073     <td>
1074
1075 <p>
1076 Sends text from a user to another user.
1077 <p>
1078 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)
1079 <p>
1080 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>.
1081 <p>
1082 <div class="fragment"><pre>00169 {
1083 00170         WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
1084 00171 }
1085 </pre></div>    </td>
1086   </tr>
1087 </table>
1088 <a name="a11" doxytag="Server::SendWallops"></a><p>
1089 <table width="100%" cellpadding="2" cellspacing="0" border="0">
1090   <tr>
1091     <td class="md">
1092       <table cellpadding="0" cellspacing="0" border="0">
1093         <tr>
1094           <td class="md" nowrap valign="top"> void Server::SendWallops </td>
1095           <td class="md" valign="top">(&nbsp;</td>
1096           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1097           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
1098         </tr>
1099         <tr>
1100           <td></td>
1101           <td></td>
1102           <td class="md" nowrap>std::string&nbsp;</td>
1103           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
1104         </tr>
1105         <tr>
1106           <td></td>
1107           <td class="md">)&nbsp;</td>
1108           <td class="md" colspan="2"><code> [virtual]</code></td>
1109         </tr>
1110
1111       </table>
1112     </td>
1113   </tr>
1114 </table>
1115 <table cellspacing=5 cellpadding=0 border=0>
1116   <tr>
1117     <td>
1118       &nbsp;
1119     </td>
1120     <td>
1121
1122 <p>
1123 Sends a WALLOPS message.
1124 <p>
1125 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
1126 <p>
1127 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>.
1128 <p>
1129 <div class="fragment"><pre>00203 {
1130 00204         WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str());
1131 00205 }
1132 </pre></div>    </td>
1133   </tr>
1134 </table>
1135 <hr>The documentation for this class was generated from the following files:<ul>
1136 <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>
1137 <hr><address style="align: right;"><small>Generated on Sun Apr 4 23:02:31 2004 for InspIRCd by
1138 <a href="http://www.doxygen.org/index.html">
1139 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
1140 width=110 height=53></a>1.3-rc3 </small></address>
1141 </body>
1142 </html>