]> 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="doxygen.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="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> (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, 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, 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, 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, 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, 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, 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, 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, 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> (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> (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> (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 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 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 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 </table>
64 <hr><a name="_details"></a><h2>Detailed Description</h2>
65 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.
66 <p>
67 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. 
68 <p>
69
70 <p>
71 Definition at line <a class="el" href="modules_8h-source.html#l00147">147</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
72 <a name="a0" doxytag="Server::Server"></a><p>
73 <table width="100%" cellpadding="2" cellspacing="0" border="0">
74   <tr>
75     <td class="md">
76       <table cellpadding="0" cellspacing="0" border="0">
77         <tr>
78           <td class="md" nowrap valign="top"> Server::Server </td>
79           <td class="md" valign="top">(&nbsp;</td>
80           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
81           <td class="md" valign="top">)&nbsp;</td>
82           <td class="md" nowrap></td>
83         </tr>
84
85       </table>
86     </td>
87   </tr>
88 </table>
89 <table cellspacing=5 cellpadding=0 border=0>
90   <tr>
91     <td>
92       &nbsp;
93     </td>
94     <td>
95
96 <p>
97 Default constructor.
98 <p>
99 Creates a Server object.
100 <p>
101 Definition at line <a class="el" href="modules_8cpp-source.html#l00043">43</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
102 <p>
103 <div class="fragment"><pre>00044 {
104 00045 }
105 </pre></div>    </td>
106   </tr>
107 </table>
108 <a name="a1" doxytag="Server::~Server"></a><p>
109 <table width="100%" cellpadding="2" cellspacing="0" border="0">
110   <tr>
111     <td class="md">
112       <table cellpadding="0" cellspacing="0" border="0">
113         <tr>
114           <td class="md" nowrap valign="top"> Server::~Server </td>
115           <td class="md" valign="top">(&nbsp;</td>
116           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
117           <td class="md" valign="top">)&nbsp;</td>
118           <td class="md" nowrap><code> [virtual]</code></td>
119         </tr>
120
121       </table>
122     </td>
123   </tr>
124 </table>
125 <table cellspacing=5 cellpadding=0 border=0>
126   <tr>
127     <td>
128       &nbsp;
129     </td>
130     <td>
131
132 <p>
133 Default destructor.
134 <p>
135 Destroys a Server object.
136 <p>
137 Definition at line <a class="el" href="modules_8cpp-source.html#l00047">47</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
138 <p>
139 <div class="fragment"><pre>00048 {
140 00049 }
141 </pre></div>    </td>
142   </tr>
143 </table>
144 <hr><h2>Member Function Documentation</h2>
145 <a name="a15" doxytag="Server::ChanMode"></a><p>
146 <table width="100%" cellpadding="2" cellspacing="0" border="0">
147   <tr>
148     <td class="md">
149       <table cellpadding="0" cellspacing="0" border="0">
150         <tr>
151           <td class="md" nowrap valign="top"> string Server::ChanMode </td>
152           <td class="md" valign="top">(&nbsp;</td>
153           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
154           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
155         </tr>
156         <tr>
157           <td></td>
158           <td></td>
159           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
160           <td class="mdname" nowrap>&nbsp; <em>Chan</em></td>
161         </tr>
162         <tr>
163           <td></td>
164           <td class="md">)&nbsp;</td>
165           <td class="md" colspan="2"><code> [virtual]</code></td>
166         </tr>
167
168       </table>
169     </td>
170   </tr>
171 </table>
172 <table cellspacing=5 cellpadding=0 border=0>
173   <tr>
174     <td>
175       &nbsp;
176     </td>
177     <td>
178
179 <p>
180 Attempts to look up a user's privilages on a channel.
181 <p>
182 This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.
183 <p>
184 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>.
185 <p>
186 <div class="fragment"><pre>00131 {
187 00132         string mode = cmode(User,Chan);
188 00133         <span class="keywordflow">return</span> mode;
189 00134 }
190 </pre></div>    </td>
191   </tr>
192 </table>
193 <a name="a9" doxytag="Server::CommonChannels"></a><p>
194 <table width="100%" cellpadding="2" cellspacing="0" border="0">
195   <tr>
196     <td class="md">
197       <table cellpadding="0" cellspacing="0" border="0">
198         <tr>
199           <td class="md" nowrap valign="top"> bool Server::CommonChannels </td>
200           <td class="md" valign="top">(&nbsp;</td>
201           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
202           <td class="mdname" nowrap>&nbsp; <em>u1</em>, </td>
203         </tr>
204         <tr>
205           <td></td>
206           <td></td>
207           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
208           <td class="mdname" nowrap>&nbsp; <em>u2</em></td>
209         </tr>
210         <tr>
211           <td></td>
212           <td class="md">)&nbsp;</td>
213           <td class="md" colspan="2"><code> [virtual]</code></td>
214         </tr>
215
216       </table>
217     </td>
218   </tr>
219 </table>
220 <table cellspacing=5 cellpadding=0 border=0>
221   <tr>
222     <td>
223       &nbsp;
224     </td>
225     <td>
226
227 <p>
228 Returns true if two users share a common channel.
229 <p>
230 This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#a10">Server::SendCommon</a> method.
231 <p>
232 Definition at line <a class="el" href="modules_8cpp-source.html#l00093">93</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
233 <p>
234 <div class="fragment"><pre>00094 {
235 00095         <span class="keywordflow">return</span> (common_channels(u1,u2) != 0);
236 00096 }
237 </pre></div>    </td>
238   </tr>
239 </table>
240 <a name="a14" doxytag="Server::FindChannel"></a><p>
241 <table width="100%" cellpadding="2" cellspacing="0" border="0">
242   <tr>
243     <td class="md">
244       <table cellpadding="0" cellspacing="0" border="0">
245         <tr>
246           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
247           <td class="md" valign="top">(&nbsp;</td>
248           <td class="md" nowrap valign="top">string&nbsp;</td>
249           <td class="mdname1" valign="top" nowrap>&nbsp; <em>channel</em>          </td>
250           <td class="md" valign="top">)&nbsp;</td>
251           <td class="md" nowrap><code> [virtual]</code></td>
252         </tr>
253
254       </table>
255     </td>
256   </tr>
257 </table>
258 <table cellspacing=5 cellpadding=0 border=0>
259   <tr>
260     <td>
261       &nbsp;
262     </td>
263     <td>
264
265 <p>
266 Attempts to look up a channel and return a pointer to it.
267 <p>
268 This function will return NULL if the channel does not exist.
269 <p>
270 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>.
271 <p>
272 <div class="fragment"><pre>00126 {
273 00127         <span class="keywordflow">return</span> FindChan(channel.c_str());
274 00128 }
275 </pre></div>    </td>
276   </tr>
277 </table>
278 <a name="a13" doxytag="Server::FindNick"></a><p>
279 <table width="100%" cellpadding="2" cellspacing="0" border="0">
280   <tr>
281     <td class="md">
282       <table cellpadding="0" cellspacing="0" border="0">
283         <tr>
284           <td class="md" nowrap valign="top"> <a class="el" href="classuserrec.html">userrec</a> * Server::FindNick </td>
285           <td class="md" valign="top">(&nbsp;</td>
286           <td class="md" nowrap valign="top">string&nbsp;</td>
287           <td class="mdname1" valign="top" nowrap>&nbsp; <em>nick</em>          </td>
288           <td class="md" valign="top">)&nbsp;</td>
289           <td class="md" nowrap><code> [virtual]</code></td>
290         </tr>
291
292       </table>
293     </td>
294   </tr>
295 </table>
296 <table cellspacing=5 cellpadding=0 border=0>
297   <tr>
298     <td>
299       &nbsp;
300     </td>
301     <td>
302
303 <p>
304 Attempts to look up a nick and return a pointer to it.
305 <p>
306 This function will return NULL if the nick does not exist.
307 <p>
308 Definition at line <a class="el" href="modules_8cpp-source.html#l00120">120</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
309 <p>
310 <div class="fragment"><pre>00121 {
311 00122         <span class="keywordflow">return</span> Find(nick);
312 00123 }
313 </pre></div>    </td>
314   </tr>
315 </table>
316 <a name="a18" doxytag="Server::GetAdmin"></a><p>
317 <table width="100%" cellpadding="2" cellspacing="0" border="0">
318   <tr>
319     <td class="md">
320       <table cellpadding="0" cellspacing="0" border="0">
321         <tr>
322           <td class="md" nowrap valign="top"> <a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
323           <td class="md" valign="top">(&nbsp;</td>
324           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
325           <td class="md" valign="top">)&nbsp;</td>
326           <td class="md" nowrap><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 Returns the information of the server as returned by the /ADMIN command.
342 <p>
343 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.
344 <p>
345 Definition at line <a class="el" href="modules_8cpp-source.html#l00146">146</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
346 <p>
347 <div class="fragment"><pre>00147 {
348 00148         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
349 00149 }
350 </pre></div>    </td>
351   </tr>
352 </table>
353 <a name="a17" doxytag="Server::GetNetworkName"></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"> string Server::GetNetworkName </td>
360           <td class="md" valign="top">(&nbsp;</td>
361           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
362           <td class="md" valign="top">)&nbsp;</td>
363           <td class="md" nowrap><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 the network name, global to all linked servers.
379 <p>
380
381 <p>
382 Definition at line <a class="el" href="modules_8cpp-source.html#l00141">141</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
383 <p>
384 <div class="fragment"><pre>00142 {
385 00143         <span class="keywordflow">return</span> getnetworkname();
386 00144 }
387 </pre></div>    </td>
388   </tr>
389 </table>
390 <a name="a16" doxytag="Server::GetServerName"></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"> string Server::GetServerName </td>
397           <td class="md" valign="top">(&nbsp;</td>
398           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
399           <td class="md" valign="top">)&nbsp;</td>
400           <td class="md" nowrap><code> [virtual]</code></td>
401         </tr>
402
403       </table>
404     </td>
405   </tr>
406 </table>
407 <table cellspacing=5 cellpadding=0 border=0>
408   <tr>
409     <td>
410       &nbsp;
411     </td>
412     <td>
413
414 <p>
415 Returns the server name of the server where the module is loaded.
416 <p>
417
418 <p>
419 Definition at line <a class="el" href="modules_8cpp-source.html#l00136">136</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
420 <p>
421 <div class="fragment"><pre>00137 {
422 00138         <span class="keywordflow">return</span> getservername();
423 00139 }
424 </pre></div>    </td>
425   </tr>
426 </table>
427 <a name="a12" doxytag="Server::IsNick"></a><p>
428 <table width="100%" cellpadding="2" cellspacing="0" border="0">
429   <tr>
430     <td class="md">
431       <table cellpadding="0" cellspacing="0" border="0">
432         <tr>
433           <td class="md" nowrap valign="top"> bool Server::IsNick </td>
434           <td class="md" valign="top">(&nbsp;</td>
435           <td class="md" nowrap valign="top">string&nbsp;</td>
436           <td class="mdname1" valign="top" nowrap>&nbsp; <em>nick</em>          </td>
437           <td class="md" valign="top">)&nbsp;</td>
438           <td class="md" nowrap><code> [virtual]</code></td>
439         </tr>
440
441       </table>
442     </td>
443   </tr>
444 </table>
445 <table cellspacing=5 cellpadding=0 border=0>
446   <tr>
447     <td>
448       &nbsp;
449     </td>
450     <td>
451
452 <p>
453 Returns true if a nick is valid.
454 <p>
455 Nicks for unregistered connections will return false.
456 <p>
457 Definition at line <a class="el" href="modules_8cpp-source.html#l00115">115</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
458 <p>
459 <div class="fragment"><pre>00116 {
460 00117         <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0);
461 00118 }
462 </pre></div>    </td>
463   </tr>
464 </table>
465 <a name="a3" doxytag="Server::Log"></a><p>
466 <table width="100%" cellpadding="2" cellspacing="0" border="0">
467   <tr>
468     <td class="md">
469       <table cellpadding="0" cellspacing="0" border="0">
470         <tr>
471           <td class="md" nowrap valign="top"> void Server::Log </td>
472           <td class="md" valign="top">(&nbsp;</td>
473           <td class="md" nowrap valign="top">int&nbsp;</td>
474           <td class="mdname" nowrap>&nbsp; <em>level</em>, </td>
475         </tr>
476         <tr>
477           <td></td>
478           <td></td>
479           <td class="md" nowrap>string&nbsp;</td>
480           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
481         </tr>
482         <tr>
483           <td></td>
484           <td class="md">)&nbsp;</td>
485           <td class="md" colspan="2"><code> [virtual]</code></td>
486         </tr>
487
488       </table>
489     </td>
490   </tr>
491 </table>
492 <table cellspacing=5 cellpadding=0 border=0>
493   <tr>
494     <td>
495       &nbsp;
496     </td>
497     <td>
498
499 <p>
500 Writes a log string.
501 <p>
502 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.
503 <p>
504 Definition at line <a class="el" href="modules_8cpp-source.html#l00056">56</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
505 <p>
506 <div class="fragment"><pre>00057 {
507 00058         log(level,<span class="stringliteral">"%s"</span>,s.c_str());
508 00059 }
509 </pre></div>    </td>
510   </tr>
511 </table>
512 <a name="a4" doxytag="Server::Send"></a><p>
513 <table width="100%" cellpadding="2" cellspacing="0" border="0">
514   <tr>
515     <td class="md">
516       <table cellpadding="0" cellspacing="0" border="0">
517         <tr>
518           <td class="md" nowrap valign="top"> void Server::Send </td>
519           <td class="md" valign="top">(&nbsp;</td>
520           <td class="md" nowrap valign="top">int&nbsp;</td>
521           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
522         </tr>
523         <tr>
524           <td></td>
525           <td></td>
526           <td class="md" nowrap>string&nbsp;</td>
527           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
528         </tr>
529         <tr>
530           <td></td>
531           <td class="md">)&nbsp;</td>
532           <td class="md" colspan="2"><code> [virtual]</code></td>
533         </tr>
534
535       </table>
536     </td>
537   </tr>
538 </table>
539 <table cellspacing=5 cellpadding=0 border=0>
540   <tr>
541     <td>
542       &nbsp;
543     </td>
544     <td>
545
546 <p>
547 Sends a line of text down a TCP/IP socket.
548 <p>
549 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
550 <p>
551 Definition at line <a class="el" href="modules_8cpp-source.html#l00061">61</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
552 <p>
553 <div class="fragment"><pre>00062 {
554 00063         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
555 00064 }
556 </pre></div>    </td>
557   </tr>
558 </table>
559 <a name="a8" doxytag="Server::SendChannel"></a><p>
560 <table width="100%" cellpadding="2" cellspacing="0" border="0">
561   <tr>
562     <td class="md">
563       <table cellpadding="0" cellspacing="0" border="0">
564         <tr>
565           <td class="md" nowrap valign="top"> void Server::SendChannel </td>
566           <td class="md" valign="top">(&nbsp;</td>
567           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
568           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
569         </tr>
570         <tr>
571           <td></td>
572           <td></td>
573           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
574           <td class="mdname" nowrap>&nbsp; <em>Channel</em>, </td>
575         </tr>
576         <tr>
577           <td></td>
578           <td></td>
579           <td class="md" nowrap>string&nbsp;</td>
580           <td class="mdname" nowrap>&nbsp; <em>s</em>, </td>
581         </tr>
582         <tr>
583           <td></td>
584           <td></td>
585           <td class="md" nowrap>bool&nbsp;</td>
586           <td class="mdname" nowrap>&nbsp; <em>IncludeSender</em></td>
587         </tr>
588         <tr>
589           <td></td>
590           <td class="md">)&nbsp;</td>
591           <td class="md" colspan="2"><code> [virtual]</code></td>
592         </tr>
593
594       </table>
595     </td>
596   </tr>
597 </table>
598 <table cellspacing=5 cellpadding=0 border=0>
599   <tr>
600     <td>
601       &nbsp;
602     </td>
603     <td>
604
605 <p>
606 Sends text from a user to a channel (mulicast).
607 <p>
608 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).
609 <p>
610 Definition at line <a class="el" href="modules_8cpp-source.html#l00081">81</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
611 <p>
612 <div class="fragment"><pre>00082 {
613 00083         <span class="keywordflow">if</span> (IncludeSender)
614 00084         {
615 00085                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
616 00086         }
617 00087         <span class="keywordflow">else</span>
618 00088         {
619 00089                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
620 00090         }
621 00091 }
622 </pre></div>    </td>
623   </tr>
624 </table>
625 <a name="a10" doxytag="Server::SendCommon"></a><p>
626 <table width="100%" cellpadding="2" cellspacing="0" border="0">
627   <tr>
628     <td class="md">
629       <table cellpadding="0" cellspacing="0" border="0">
630         <tr>
631           <td class="md" nowrap valign="top"> void Server::SendCommon </td>
632           <td class="md" valign="top">(&nbsp;</td>
633           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
634           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
635         </tr>
636         <tr>
637           <td></td>
638           <td></td>
639           <td class="md" nowrap>string&nbsp;</td>
640           <td class="mdname" nowrap>&nbsp; <em>text</em>, </td>
641         </tr>
642         <tr>
643           <td></td>
644           <td></td>
645           <td class="md" nowrap>bool&nbsp;</td>
646           <td class="mdname" nowrap>&nbsp; <em>IncludeSender</em></td>
647         </tr>
648         <tr>
649           <td></td>
650           <td class="md">)&nbsp;</td>
651           <td class="md" colspan="2"><code> [virtual]</code></td>
652         </tr>
653
654       </table>
655     </td>
656   </tr>
657 </table>
658 <table cellspacing=5 cellpadding=0 border=0>
659   <tr>
660     <td>
661       &nbsp;
662     </td>
663     <td>
664
665 <p>
666 Sends text from a user to one or more channels (mulicast).
667 <p>
668 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.
669 <p>
670 Definition at line <a class="el" href="modules_8cpp-source.html#l00098">98</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
671 <p>
672 <div class="fragment"><pre>00099 {
673 00100         <span class="keywordflow">if</span> (IncludeSender)
674 00101         {
675 00102                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
676 00103         }
677 00104         <span class="keywordflow">else</span>
678 00105         {
679 00106                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
680 00107         }
681 00108 }
682 </pre></div>    </td>
683   </tr>
684 </table>
685 <a name="a6" doxytag="Server::SendFrom"></a><p>
686 <table width="100%" cellpadding="2" cellspacing="0" border="0">
687   <tr>
688     <td class="md">
689       <table cellpadding="0" cellspacing="0" border="0">
690         <tr>
691           <td class="md" nowrap valign="top"> void Server::SendFrom </td>
692           <td class="md" valign="top">(&nbsp;</td>
693           <td class="md" nowrap valign="top">int&nbsp;</td>
694           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
695         </tr>
696         <tr>
697           <td></td>
698           <td></td>
699           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
700           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
701         </tr>
702         <tr>
703           <td></td>
704           <td></td>
705           <td class="md" nowrap>string&nbsp;</td>
706           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
707         </tr>
708         <tr>
709           <td></td>
710           <td class="md">)&nbsp;</td>
711           <td class="md" colspan="2"><code> [virtual]</code></td>
712         </tr>
713
714       </table>
715     </td>
716   </tr>
717 </table>
718 <table cellspacing=5 cellpadding=0 border=0>
719   <tr>
720     <td>
721       &nbsp;
722     </td>
723     <td>
724
725 <p>
726 Sends text from a user to a socket.
727 <p>
728 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)
729 <p>
730 Definition at line <a class="el" href="modules_8cpp-source.html#l00071">71</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
731 <p>
732 <div class="fragment"><pre>00072 {
733 00073         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
734 00074 }
735 </pre></div>    </td>
736   </tr>
737 </table>
738 <a name="a2" doxytag="Server::SendOpers"></a><p>
739 <table width="100%" cellpadding="2" cellspacing="0" border="0">
740   <tr>
741     <td class="md">
742       <table cellpadding="0" cellspacing="0" border="0">
743         <tr>
744           <td class="md" nowrap valign="top"> void Server::SendOpers </td>
745           <td class="md" valign="top">(&nbsp;</td>
746           <td class="md" nowrap valign="top">string&nbsp;</td>
747           <td class="mdname1" valign="top" nowrap>&nbsp; <em>s</em>          </td>
748           <td class="md" valign="top">)&nbsp;</td>
749           <td class="md" nowrap><code> [virtual]</code></td>
750         </tr>
751
752       </table>
753     </td>
754   </tr>
755 </table>
756 <table cellspacing=5 cellpadding=0 border=0>
757   <tr>
758     <td>
759       &nbsp;
760     </td>
761     <td>
762
763 <p>
764 Sends text to all opers.
765 <p>
766 This method sends a server notice to all opers with the usermode +s.
767 <p>
768 Definition at line <a class="el" href="modules_8cpp-source.html#l00051">51</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
769 <p>
770 <div class="fragment"><pre>00052 {
771 00053         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
772 00054 }
773 </pre></div>    </td>
774   </tr>
775 </table>
776 <a name="a5" doxytag="Server::SendServ"></a><p>
777 <table width="100%" cellpadding="2" cellspacing="0" border="0">
778   <tr>
779     <td class="md">
780       <table cellpadding="0" cellspacing="0" border="0">
781         <tr>
782           <td class="md" nowrap valign="top"> void Server::SendServ </td>
783           <td class="md" valign="top">(&nbsp;</td>
784           <td class="md" nowrap valign="top">int&nbsp;</td>
785           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
786         </tr>
787         <tr>
788           <td></td>
789           <td></td>
790           <td class="md" nowrap>string&nbsp;</td>
791           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
792         </tr>
793         <tr>
794           <td></td>
795           <td class="md">)&nbsp;</td>
796           <td class="md" colspan="2"><code> [virtual]</code></td>
797         </tr>
798
799       </table>
800     </td>
801   </tr>
802 </table>
803 <table cellspacing=5 cellpadding=0 border=0>
804   <tr>
805     <td>
806       &nbsp;
807     </td>
808     <td>
809
810 <p>
811 Sends text from the server to a socket.
812 <p>
813 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
814 <p>
815 Definition at line <a class="el" href="modules_8cpp-source.html#l00066">66</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
816 <p>
817 <div class="fragment"><pre>00067 {
818 00068         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
819 00069 }
820 </pre></div>    </td>
821   </tr>
822 </table>
823 <a name="a7" doxytag="Server::SendTo"></a><p>
824 <table width="100%" cellpadding="2" cellspacing="0" border="0">
825   <tr>
826     <td class="md">
827       <table cellpadding="0" cellspacing="0" border="0">
828         <tr>
829           <td class="md" nowrap valign="top"> void Server::SendTo </td>
830           <td class="md" valign="top">(&nbsp;</td>
831           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
832           <td class="mdname" nowrap>&nbsp; <em>Source</em>, </td>
833         </tr>
834         <tr>
835           <td></td>
836           <td></td>
837           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
838           <td class="mdname" nowrap>&nbsp; <em>Dest</em>, </td>
839         </tr>
840         <tr>
841           <td></td>
842           <td></td>
843           <td class="md" nowrap>string&nbsp;</td>
844           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
845         </tr>
846         <tr>
847           <td></td>
848           <td class="md">)&nbsp;</td>
849           <td class="md" colspan="2"><code> [virtual]</code></td>
850         </tr>
851
852       </table>
853     </td>
854   </tr>
855 </table>
856 <table cellspacing=5 cellpadding=0 border=0>
857   <tr>
858     <td>
859       &nbsp;
860     </td>
861     <td>
862
863 <p>
864 Sends text from a user to another user.
865 <p>
866 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)
867 <p>
868 Definition at line <a class="el" href="modules_8cpp-source.html#l00076">76</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
869 <p>
870 <div class="fragment"><pre>00077 {
871 00078         WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
872 00079 }
873 </pre></div>    </td>
874   </tr>
875 </table>
876 <a name="a11" doxytag="Server::SendWallops"></a><p>
877 <table width="100%" cellpadding="2" cellspacing="0" border="0">
878   <tr>
879     <td class="md">
880       <table cellpadding="0" cellspacing="0" border="0">
881         <tr>
882           <td class="md" nowrap valign="top"> void Server::SendWallops </td>
883           <td class="md" valign="top">(&nbsp;</td>
884           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
885           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
886         </tr>
887         <tr>
888           <td></td>
889           <td></td>
890           <td class="md" nowrap>string&nbsp;</td>
891           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
892         </tr>
893         <tr>
894           <td></td>
895           <td class="md">)&nbsp;</td>
896           <td class="md" colspan="2"><code> [virtual]</code></td>
897         </tr>
898
899       </table>
900     </td>
901   </tr>
902 </table>
903 <table cellspacing=5 cellpadding=0 border=0>
904   <tr>
905     <td>
906       &nbsp;
907     </td>
908     <td>
909
910 <p>
911 Sends a WALLOPS message.
912 <p>
913 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
914 <p>
915 Definition at line <a class="el" href="modules_8cpp-source.html#l00110">110</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
916 <p>
917 <div class="fragment"><pre>00111 {
918 00112         WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str());
919 00113 }
920 </pre></div>    </td>
921   </tr>
922 </table>
923 <hr>The documentation for this class was generated from the following files:<ul>
924 <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>
925 <hr><address style="align: right;"><small>Generated on Sun Mar 30 19:36:22 2003 for InspIRCd by
926 <a href="http://www.doxygen.org/index.html">
927 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
928 width=110 height=53></a>1.3-rc3 </small></address>
929 </body>
930 </html>